On 12/3/05, Malcolm Rowe <email@example.com> wrote:
> On Fri, Dec 02, 2005 at 11:35:53AM -0800, Daniel Rall wrote:
> > Well over a year ago, I sent in a patch to fix a problem Justin
> > Erenkrantz noted on OS X when building with Jikes. (Possibly to do
> > with finding his Java runtime JARs? He didn't specify.)
> Ok, I understand what's going on now. On OS X, the shipped javac knows
> how to find the Java system classes automatically, but the shipped
> jikes executable (in /usr/bin/jikes) doesn't - it needs to be told via
> Since we pick up jikes by preference, we need to fix the JAVA_CLASSPATH
> logic to find the system classes on Darwin.
> However, the patch doesn't work for me. I don't have JAVA_HOME set,
> which means that $JDK is correctly set to /Library/Java/Home from the
> start, and so the fixup logic you changed doesn't run.
> Since the 'JRE lib dir' is always in the same place on Darwin (or, more
> accurately, we have no better guesses for where it might be located),
> why not set $JRE_LIB_DIR unconditionally on Darwin (we'll only use it
> for jikes-enabled builds, of course)?
> Updated patch attached. I can confirm that it appears to fix 'make
> javahl' for me on OS X 10.4.3, anyway, which previously bombed out right
> at the start.
> Index: build/ac-macros/java.m4
> --- build/ac-macros/java.m4 (revision 17597)
> +++ build/ac-macros/java.m4 (working copy)
> @@ -64,6 +64,12 @@
> if test "$os_arch" = "Darwin" -a "$JDK" = "/usr" -a -d "/Library/Java/Home"; then
> + if test "$os_arch" = "Darwin"; then
> + JRE_LIB_DIR="/System/Library/Frameworks/JavaVM.framework/Classes"
> + else
> + JRE_LIB_DIR="$JDK/jre/lib"
> + fi
Perhaps use this test instead, to be consistant with the test for
if test "$os_arch" = "Darwin" -a "$JDK" = "/Library/Java/Home"; then
I'm not familiar with Mac OS X, but I'd guess that if $JDK is in a
non-standard location, then we'd be better off using "$JDK/jre/lib"
than the standard location for $JRE_LIB_DIR.
David James -- http://www.cs.toronto.edu/~james
Received on Tue Dec 6 03:47:36 2005