Mantis - Resin
Viewing Issue Advanced Details
4572 minor always 05-24-11 17:56 07-25-11 15:43
rickHigh  
ferg  
normal  
closed  
fixed  
none    
none 4.0.21  
0004572: Unable to compile on OSX 10.6.6 due to ./configure not finding java
The error message from ./configure is as follows:

______________
checking if /System/Library/Frameworks/JavaVM.framework/Versions/Current/bin/java is Java 1.6...
no

configure: error: Java 1.6 required. /System/Library/Frameworks/JavaVM.framework/Versions/Current/bin/java returned: ./configure: line 11248: /System/Library/Frameworks/JavaVM.framework/Versions/Current/bin/java: No such file or directory
_____________

Java is on the system, but they have moved its location.

$ which java
/usr/bin/java

$ ls -l /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Mar 11 00:14 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

It is under .../Commands/java Not .../bin/java

Notes
(0005276)
cowan   
05-25-11 13:22   
OSX has a built-in command that's supposed to always tell you where java_home is

/usr/libexec/java_home

I have this in my .bash_profile, we could use it in the configure script also;

export JAVA_HOME=`/usr/libexec/java_home`