Issue Details (XML | Word | Printable)

Key: GROOVY-2245
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jochen Theodorou
Reporter: Antti Karanta
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

groovy launch requires "tools.jar" system property to be set even if corresponding file does not exist

Created: 25/Oct/07 11:21 AM   Updated: 26/Oct/07 12:19 AM
Component/s: None
Affects Version/s: 1.1-rc-1
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified

Environment: os-x


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jochen Theodorou added a comment - 25/Oct/07 11:36 AM
setting the "tools.jar" property to an empty value would have already solved the problem. I made a different approach and that is to comment out the tools.jar in the groovy-starter.conf. I would really like to keep that error message for other properties

Russel Winder added a comment - 26/Oct/07 12:19 AM
The native launcher now appears to work as expected on Solaris, Ubuntu and Mac OS X.