[java] File Access
I was writing a java applet and I can only seem to access files if I give their absolute paths. This worked on my machine but when I uploaded the applet to the server and the trial data to the same directory, the applet could not find it. I tried doing new File("data") and New File( getCodeBase(), data) and it couldn''t find the file. Help?
you can''t access files with applets. The applet is running inside the local browser, but the data files are on the web server. How is new File() supposed to find them? You need to do new URL(), and the name of the server must be the same as where the applet was downloaded from for security reasons.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement