octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JAVA_HOME on Mac OS X


From: Alexander Hansen
Subject: Re: JAVA_HOME on Mac OS X
Date: Fri, 07 Dec 2012 12:32:26 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/7/12 12:14 PM, Rik wrote:
> On 12/07/2012 09:00 AM, address@hidden wrote:
>> Date: Fri, 07 Dec 2012 09:59:49 -0700
>> From: Alexander Hansen <address@hidden>
>> To: Philip Nienhuis <address@hidden>
>> Cc: address@hidden
>> Subject: Re: Java compilation warnings
>> Message-ID: <address@hidden>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> On 12/7/12 9:20 AM, Philip Nienhuis wrote:
>>
>> <snip>
>>
>>>> I got reports from a Fink developer telling me that on Mac OSX the JDK
>>>> location might change with every new OSX version and the JDK is no more
>>>> comprehensive but scattered all over the place. The Apple tool 'javaconfig'
>>>> is needed to find out what parts are where.
>>>>
>>>> Philip
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: 
>>>> http://octave.1599824.n4.nabble.com/Java-compilation-warnings-tp4647602p4647621.html
>>>> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>>>>
>> javaconfig doesn't actually work properly as of 10.8, apparently, since
>> the property list file that it uses isn't installed.
>>
>> I've been trying to find a different system-provided tool to do the same
>> thing, but no without success as of yet.
> On Mac's the location will change between different versions.  You are also
> supposed to be able to set preferences that determine which Java gets
> executed when you have multiple versions installed.
> 
> I was going to install this code, but it would be nice if someone with a
> Mac could verify that it actually works.
> 
>   # On Mac OS X 10.5 and following, run /usr/libexec/java_home to get
>   # the value of JAVA_HOME to use.
>   # (http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html).
>   JAVA_HOME=`/usr/libexec/java_home 2>/dev/null`
> 
> --Rik
> 

That works for 10.5 through 10.8, and there are additional options to
get more detailed output.  I knew about it. :-)

What it doesn't do is point to where the headers and libraries live.
Right now on OS 10.8 there's an annoying problem where the Java
libraries and  are installed in different parent directories, even for
the same nominal build number, depending on whether one upgraded from an
earlier OS version or did a clean install, but the JAVA_HOME as per
/usr/libexec/java_home is identical.

-- 
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]