Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Broken Java Mac 10.6

Tags:

Some background:

On Mac OS X 10.6 using Macports and I have DYLD_LIBRARY_PATH set in my .bash_profile.

The problem:

When I run java -version I get this error:

Error occurred during initialization of VM
Unable to load native library: libjava.jnilib

By way of one helpful forum thread, I've discovered the problem is some files in my '/opt/local/lib' directory are causing trouble because of the DYLD_LIBRARY_PATH I've set.

When I remove the files starting with libgif, libjpeg, libpng and libtiff from '/opt/local/lib', the problem goes away and `java -version' works, but the ports that depend on those files break.

Anyone know of a way I can keep the files and still get java to work properly? Possibly setting the java path, which I'm not quite sure how to do and all my attempts have failed.

Thanks.