I have an applet that displays files that are resident in a certain network
directory. I compile and run the script in JPad it it displays the files
fine. When I copy the class file to my intranet directory and run the applet
in the web browser, it doesn't show the files in the directory. The script
is below. If I'm going about this all wrong, please let me know - I'm a
beginner.
Thanks in advance..
---------------------------------------------
import java.io.*;
import java.awt.*;

public class jobPosting extends java.applet.Applet
{
String direct = "\\\\hostname\\path\\";
int ht = 50;

public void init()
{
resize(300,300);
setBackground(Color.green);
}

public void paint(Graphics g)
{ g.drawString("Test Message", 100, 125);

getFileList();

String[] direct;
File f = new File(System.getProperty("user.dir"));
direct = f.list();

for(int i=0; i< direct.length; i++)
{
g.drawString(direct[i], 50, ht);
ht = ht + 20;
}
}//end paint

public void getFileList()
{
//**** This shows files inthe current directory. ****
File dir = new File(System.getProperty("user.dir"));
String user_dir = System.getProperty("user.dir");
//**** This shows files in the directory as set above. ****
System.setProperty ("user.dir", direct);
user_dir = System.getProperty ("user.dir");
//System.out.println(direct);

}//end getFileList

}//end applet
----------------------------------------------