This content has been marked as final. Show 4 replies
As mentioned in Sun doc (http://download.oracle.com/javase/1.3/docs/guide/jar/jar.html#Main Attributes) , it takes a relative path/URL.In other words a URL that is to be interpreted relative to the location of the JAR file.
We tried following formats , none of them worksNone of those four is a relative URL. They are all absolute URLs.
None of your attempts is a relative URL's. A relative URL is a fancy name for a relative path. Relative to what? To your jar's path.
The rationale is that your jar can be deployed in all kind of places in the different users' file systems and if it has dependent jars, they better always be at a known location relative to your jar's location.
Examples of relative URL's:
We have a limitation in keeping the relative path in our featureset. The reason for this is that , the featureset jar is loaded from a Temp location instead of its designated location by WLS (Windows Platform only)
This was due to the bug (sun bug ) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014 , and as a work-around solution WLS copies the Libraries to a temp location and load the jar from there.
Is there any way to find out the temp location ? Or any pointer to a fool-proof work-around this situation ?
If you need to be able to replace the jar during runtime you must omit it from the classpath altogether. Moving it to a different directory doesn't accomplish anything relevant to the bug apart from disconnecting it from the classpath Manifest entry, and if it didn't do that you would still have the same problem.
You need to load the stuff in the JAR yourself via a URLClassLoader, and replace the class loader every time the JAR file changes.