Reading text files under JVM 1.4

What have happened in the java 1.4. version? Can it no longer use old applets and methods?

I've used this methode for importing a text file from the same server into the applets on my website:

1. making onload passing the filename into the applet, like this:

2. the getfile methode in the applet then passes the filename to another applet, which reads the file and passes it back as a public variable to the calling applet (to the methode testapplet.getfile)

3. The text in the test.txt file then is ready to be displayed in the calling applet.

This, simple methode has been working stable and with no problems in all browsers until now, when I try it with browsers using the JVM 1.4 version. The onload invokes the getfile methode, but the text file is no longer read.


How can I get around this?? I do hope that it still will be possible to read from text files with JVM 1.4???.


  • What is the error ? SecurityException : cannot access file ?
    In this case, the reason is that security management of applets has been modified in Jvm 1.4 (see java.sun for all details).
    To resolve this problem, you must either sign your applet or configure your %jre%/lib/security/java.policy file and grant filesystem access.

  • No - it doesn't seem like that. I get no error msg. The only misbehaviour is that the text file content no longer shows up in the calling applet.. as it does when I it is run under JVM 1.3

    The onload event apparently invokes the method in the applet and passes the filename into it. But from then things no longer works.

    I've also tested without the onload procedure, hardcoding the file name into the applet: This causes the applet to read and display the content correctly, as in former jvm versions.

    Very, very strange things ...?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!