library path for libjvm.dylib and OpenJDK
mahmood at notnoop.com
Mon Jan 4 13:58:08 PST 2010
First, thank you very much for your efforts on porting the OpenJDK to Mac OS X.
First, I have successfully compiled the bsd-port on my machine.
However, I'm having some difficulty running the JVM, when I run the
compiler, I get the following error:
$ build/bsd-amd64/j2sdk-image/bin/java -version
Error occurred during initialization of VM
Unable to load native library:
1): Library not loaded: libjvm.dylib
Reason: image not found
Setting DYLD_LIBRARY_PATH environment variable seem to fix the problem:
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-mahmood_2010_01_04_15_39-b00)
OpenJDK 64-Bit Server VM (build 17.0-b05, mixed mode)
Last time I compiled the OpenJDK (around mid december), I didn't need
to initialize that variable. I noticed that on Nov 20, there was a
change that removed LD_LIBRARY_PATH from the jdk launcher project:
date: Fri Nov 20 11:01:32 2009 -0800
files: make/java/jli/Makefile make/java/main/java/Makefile
6367077: Purge LD_LIBRARY_PATH usage from the launcher
6899834: (launcher) remove the solaris libjvm.so symlink
Summary: Fixes other related issues as well.
Reviewed-by: darcy, ohair, xlu, martin
However, I cannot detect when such change was pushed to the bsd-port.
Can you please advice how I should go forward preferably, without
setting DYLD_LIBRARY_PATH env variable?
Also a couple of points:
1. Finding the instructions was a bit tedious, if using Google.
Googling the information returned outdated instructions that required
JIXB. Luckily, I came across the wiki, and saw the linkage to java
2. Can you please elaborate on why "There may be no way to get
pre-built binaries for installation of OpenJDK on Mac OS X."? How
would that be different from the binaries hosted by Soylatte? I'm
planning to host my binaries online if possible.
Thank you very much again.
More information about the bsd-port-dev