[Laszlo-dev] what do you use for JAVA_HOME on the Mac?

P T Withington ptw at pobox.com
Wed Feb 6 04:09:39 PST 2008


I followed the instructions at http://wiki.openlaszlo.org/index.php?title=SubversionBuildInstructions#OS_X 
:_Developer_Tools_and_bash

> Mac OS X: comes with Java pre-installed; we recommend upgrading to  
> Java 1.5 if you don't have it already. Set JAVA_HOME to /Library/ 
> Java/Home. As of mid-April 2006, OS X includes and defaults to Java  
> 5.0. If you have problems, see the Gotchas section at the end of  
> this document.

This is the same as what you did, since that's just a symbolic link,  
but I think it's a teeny bit more kosher.  It is the advertised place.

If you really want to run a specific Java version, you will find that  
even the Framework/Home is a symbolic link, to the CurrentJDK, which  
is a symbolic link to the actual version you are running.  (This was  
important, for instance when Apple defaulted to JDK 5 and we weren't  
ready.  May happen again with JDK 6):

[ptw at dueling-banjos localhost 17:36:48]$ ls -l /Library/Java/Home
lrwxr-xr-x  1 root  admin  48 Oct 27 08:23 /Library/Java/Home -> / 
System/Library/Frameworks/JavaVM.framework/Home
[ptw at dueling-banjos localhost 07:04:42]$ ls -l /System/Library/ 
Frameworks/JavaVM.framework/Home
lrwxr-xr-x  1 root  wheel  24 Oct 27 08:23 /System/Library/Frameworks/ 
JavaVM.framework/Home -> Versions/CurrentJDK/Home
[ptw at dueling-banjos localhost 07:06:27]$ ls -l /System/Library/ 
Frameworks/JavaVM.framework/Versions/CurrentJDK/
lrwxr-xr-x  1 root  wheel  5 Oct 27 08:23 /System/Library/Frameworks/ 
JavaVM.framework/Versions/CurrentJDK/ -> 1.5.0
[ptw at dueling-banjos localhost 07:07:04]$

On 2008-02-05, at 20:27 EST, Henry Minsky wrote:

> What are the Mac people here using for a JAVA_HOME on OSX?
>
> I found the Java installed with OS X and tracked it down to this, not
> sure if this is kosher:
>
> export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com



More information about the Laszlo-dev mailing list