setting the JAVA_HOME environment variable

James Gray james at gray.net.au
Mon Mar 24 09:41:31 UTC 2008


On 24/03/2008, at 8:28 PM, Thufir wrote:
> On Mon, 24 Mar 2008 19:48:38 +1100, James Gray wrote:
>
>
>> The error message is correct - JAVA_HOME is a directory, not the Java
>> binary.  In your case it appears you need to replace your existing
>> JAVA_HOME with:
>> $ export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
>
>
> Excellent, thank you.  I have to environment variable correct now (?),
> but this particular ruby gem fails to install still (haven't  
> examined the
> mkmf.log yet):
>
>
> extconf.rb:36:in `open': No such file or directory - /usr/lib/jvm/ 
> java-6-
> sun/jre/include (Errno::ENOENT)
>        from extconf.rb:36

This error looks like the ruby gem is expecting the Java SDK.  The  
$JAVA_HOME/include directory is only part of the Java SDK (IIRC).  Try  
installing the jdk (Java Development Kit) instead of the jre (Java  
Runtime Environment):

$ sudo apt-get install sun-java6-jdk

You may need to tweak you JAVA_HOME variable as discussed in my last  
message - I'd assume ot would change to something like "/usr/lib/jvm/ 
java-6-sun/jdk"...but just double check that, I haven't verified it :)

Cheers,

James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080324/87058e57/attachment.bin>


More information about the ubuntu-users mailing list