Downloaded JARs location
In order to put a webstart enabled release of Jext 3.0 (www.jext.org), I need to make Jython (www.jython.jar) be able to load the classes from jext.jar. But Jython cannot load'em since it cannot find jext.jar in the classpath when started by Java WebStart.
How can I programmatically determine the download jext.jar full path ?
[348 byte] By [
jext] at [2007-9-26 4:18:37]

> It does not work. The problem remains the same:
> jython.jar and jext.jar are downloaded but when jython
> gets inited by Jext, it cannot load Jext classes since
> it cannot find jext.jar in classpath.
classpath has no real meaning for execution under Web Start. Access to resources and classes is not file centric anymore, but web centric. No more path - URLs!
Some pitfalls I stumbled over, while making our application Web Start runnable:
- executing a java program from a .jar file is already different from executing from the raw .class files: on a Win32 box, a getResource("About.gif")
was issued, but the file was named "about.gif" on the disk. The class loader used by direct execution on the .class files did not complain, obviously it was case insensitive, but when I rolled a .jar and executed the program from the .jar, the classloader involved here
was not able to find the resource, so it is case sensitive.
A "..\menus.dtd" in some property was also slipping through under Win32 but caused trouble under Linux.
- executing a java programm from Web Start means not only executing from the .jar, but also additional trouble with setting the appropriate class loader. Web Start must take in classes that reside in some system location on the disk (e.g. awt classes) but on the other hand must take in classes from the .jars it just beamed over the wire into its cache locations. The usual cure here is to determine the class loader, and to use it explicitly when taking in some resource.
- sometimes one has to tell certain parts to use a different class loader too, like the UIManager:
http://forum.java.sun.com/thread.jsp?forum=38&thread=71561
There is certainly more. At the moment I'm struggling with beaming java3d (thus native libs too) over Web Start. The example that worked perfectly last week suddenly did not run anymore. I have not found what this causes, yet.
Regards,
Marc
> I do not have this kind of problems with my own Jext
> since I always used lower case resource files, called
> using getResourceAsStream() stuff.
Did you change all
getResourceAsStream()
calls into
cl.getResourceAsStream()
calls?
Regards,
Marc