Import optimization feature does't work on Mac OS X, I only get this
error message:
[jalopy] Could not find the Java runtime library (rt.jar), import
optimization feature will be disabled.
I use Jalopy 1.5b3.
I would like to get this feature on Mac, and I'm ready to help and test
to fix this problem.
Kind regards,
--
Francis Labrie
Logged In: YES
user_id=723231
Hi
I havent tested this in the newest version so it may be
broken. According to the documentation (though) it is
reported to only work if you are using the ant plugin or the
jbuilder plugin. (see
http://jalopy.sourceforge.net/imports.html\)
Which plugin where you using ?
Z
Logged In: YES
user_id=252164
I use the Ant plugin.
Logged In: YES
user_id=252164
Bye the way, it did not work on Mac OS X with pre-1.5 version as well.
Logged In: YES
user_id=33016
The problem is that AntPlugin.java:1109 manually looks for
rt.jar:
File javaRuntime =
new File(
System.getProperty("java.home" /* NOI18N */)
+ File.separator
+ "lib" /* NOI18N */ + File.separator +
"rt.jar" /* NOI18N */ );
However, on Mac, the jar that contains the standard classes
is called classes.jar (specifically, it is
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar)
A better solution to this problem than manually checking for
an "rt.jar" file would be to call something like 'URL
jarPath =
java.lang.Runtime.class.getResource("Runtime.class");', and
then use the URL that is returned to identify the location
of the jar that holds those files.
Alternately, just disable the 'if (!javaRuntime.exists())'
test and leave it to the user to ensure that they correctly
set up the correct classpath files.