java.library.path fix for MacOS X (7145798)
greg.x.brown at oracle.com
Wed Feb 22 05:27:55 PST 2012
>>> -Djava.class.path might be a workaround to get too tools.jar.
>>> It would also be a workaround to point to any file anywhere on the machine wouldn't it?
>> That is a very bad workaround. If you need a tools.jar, it should ship in your bundle.
I agree 100%. And since it is already included in the JDK, it seems silly to require users to copy it to the Java directory.
> I think Greg had mentioned the possibility of changing the starting directory so you could relative path into the bundled jre.
Right. I was thinking that we could have the launcher app set the working directory to the bundle root at startup. Then you could add this to the build script to add tools.jar (or anything else within the bundle) to the class path:
<option value="-classpath Contents/PlugIns/1.7.0.jdk/Contents/Home/lib/tools.jar"/>
More information about the macosx-port-dev