Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Baffled by local applet in J2 1.4.2

  Asked By: Aditi    Date: Aug 21    Category: Java    Views: 898

I am trying to implement a local applet to get some information about files

on the client machine, in order to implement a web based utility. The
would be globally distributed to the users.

I have done this using J2 1.3.x compilation and IE 6 with the MS JIT and
setting the CLASSPATH environemental variable appropriately.

However, I have tried to convert this all to J2 1.4.2 because MS announced
it was expecting users to transition off of MS JIT in a year. As far as I
can tell, 1.4.2 simply ignores the CLASSPATH setting. If I put the class
file in the server directory with the html page, it works. As soon as I put
it on my client PC only, it fails (with a Bad Magic Number) the same way,
regardless of CLASSPATH settings or the presense or absense of the class
file. It looks for all the world as if the Java plugin is simply ignoring
the client CLASSPATH, but I can find no indication of this in Web searches.

Also it there an obvious alternative choice for doing client system calls? I
do not need the display capacities of the applet.



1 Answer Found

Answer #1    Answered By: Angelica Ramos     Answered On: Aug 21

Well, I can now answer my own question, which is always best. The
Java VM in a browser may or may not honor the client  CLASSPATH.
Apparently the MS JIT java  VM does, and the Sun 1.4.2 plug-in does
not. The latter can be manipulated by using a -classpath <dir>
option in the runtime parameters of the Java Plug-in Control Panel.
However, 1.4.2 does not appear to recognize that the applet  is local
to the client and therefore safe. Rather one must explicitly permit
it via the .java.policy file. That in turn means I no longer have to
make it local, but can give it permissions on the server  URL.

Didn't find what you were looking for? Find more on Baffled by local applet in J2 1.4.2 Or get search suggestion and latest updates.