setting PATH and CLASSPATH in Java Applet

Hi,

I have been wondering if there was a way to set the PATH and the CLASSPATH in the HTML file within the <APPLET> tag...

What I would like to do is to read some xml files outside of the directory where my html file is located to run my test application with the configuration on my computer.

(The applet and the html file from which it is called is on my local host.)

Therefore, I have seen that in order to access local files, I have to sign my jar files, which I did.

But the tricky part is that for my test application to work, I need to set the PATH and the CLASSPATH... and I have no idea if this is possible or not...

I have seen that:

*CODEBASE: I specify here the main directory where my jar files are located

*ARCHIVE: I specify here the list of my jar files

In my case:

CODEBASE=../../(this is the root directory of my whole application)

ARCHIVE=dir/lib/jar1.jar,dir2/jar2.jar,configXML/,etc...

I don't know if I can specify the filepath of my xml files (here "configXML") in ARCHIVE (I suspect we can only specify jar files there... right ?)

Maybe I can use ARCHIVE this way to specify my CLASSPATH (and well... not completely the way I would like I suppose), but what about the PATH ?

I have been searching this for soooo long now...

Any help, hint or suggestions (I might doing this all the wrong way...) would be greatly appreciated !

Thanks in advance !

[1515 byte] By [lilisbbca] at [2007-10-3 8:46:36]
# 1

You need to use the code attribute to specify the class that contains the main method to start the application.

<applet code="myPackage.myClass.class" codeBase="http://www.someServer/someFolder/" archive="myApplet.jar">

I hope this solves part of your problem at least.

Andrew

scottie_uka at 2007-7-15 3:55:37 > top of Java-index,Desktop,Core GUI APIs...