Tuesday, November 25, 2008

OSX and JAVA_HOME

Trying to use seam-gen on my new MacBook Pro I got the following error :

The JAVA_HOME environment variable is not set
Please point it to a valid JDK installation

So I ran :

JAVA_HOME=/Library/Java/Home

This article from Apple's site suggested that the home should always point to that symlink. Unfortunately I got the same error.

Running :

java -version

showed only a JRE :

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Running :

$JAVA_HOME/bin/java -version

showed the same thing. So where is this JDK that Apple speaks of?  Its there.  The only thing that I was missing was :

export JAVA_HOME

Oops.

No comments: