Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1-rc-1
-
None
-
None
-
os-x
Description
I have been debugging a problem on the groovy native launcher on os-x with Russel Winder. The issue is about tools.jar. The native launcher checks if tools.jar is in the standard place in java home, and if it is, sets sys prop “tools.jar”. If the jar does not exist, the sys prop is not set. This logic is there because JREs do not contain tools.jar.
On os-x tools.jar is not present. Russel told me Apple has merged the stuff in rt.jar and tools.jar together into classes.jar. I guess this means that the classes in tools.jar required by groovy are available and everyone’s happy.
However, it seems that on groovy 1.1 (the native launcher used to work on os-x before, so I assume this issue was not present on 1.0) requires that the sys prop “tools.jar” be set. The script launcher (on os-x) sets it to
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/tools.jar
Such a file does not even exist, but having this value for sys prop “tools.jar” seems to make the groovy startup java code happy.
So I strongly believe this is a bug in the java startup code for groovy – there is no point setting the sys prop to point to a file that does not exist.