Application classpath and tools.jar

Michael Hall mik3hall at gmail.com
Sun Feb 19 05:06:51 PST 2012


Another behavior change between the Apple jvm's and the openjdk ones is that tools are no longer included in default system classpath.
I have added functionality into my application that needs tools.jar with 1.7.
I have been testing with a version of this jar file pulled out to a location that I can conveniently reference in classpath specifications either from Eclipse or from my application.
This will of course not work for my application when on any other machine where the jar file has not been moved. 
I have been considering as a solution determining the path to tools.jar and providing a ClassLoader at runtime that will load from it.
So far with no success. Details of failures omitted unless of interest to anyone.
Before, or while, I'm setting up a simpler standalone test case and starting to dig into why the ClassLoader solution isn't working.

Is there a simple correct way to specify classpath, particularly for bundle applications, that can be used to point to the tools.jar location in the current jdk bundle?
I don't yet have a working 1.7 openjdk version application bundle but believe that should be very near.


More information about the macosx-port-dev mailing list