octave-maintainers
[Top][All Lists]
Advanced

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

Re: Overhaul of Java auto-detection


From: Alexander Hansen
Subject: Re: Overhaul of Java auto-detection
Date: Tue, 11 Dec 2012 14:45:48 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/11/12 2:35 PM, Rik wrote:
> On 12/10/2012 04:56 PM, Alexander Hansen wrote:
>> On 12/10/12 5:34 PM, Rik wrote:
>>> On 12/10/2012 03:42 PM, Ben Abbott wrote:
>>>> On Dec 10, 2012, at 4:20 PM, Rik wrote:
>>>>
>>>>> 12/10/12
>>>>>
>>>>> All,
>>>>>
>>>>> I just pushed a changeset which significantly changes (improves?) the way
>>>>> Java is detected if JAVA_HOME has not been set
>>>>> (http://hg.savannah.gnu.org/hgweb/octave/rev/56239ff815a3). There are
>>>>> likely to be kinks which need working out and I particularly need
>>> feedback
>>>>> from Mac OS X systems. Despite all those caveats, I think this is a much
>>>>> better strategy for detection than having a laundry list of
>>> directories to
>>>>> check for each operating system and distribution.
>>>>>
>>>>> --Rik
>>>> Hi Rik,
>>>>
>>>> Definitely broke builing on MacOS X.
>>>>
>>>> Prior to your change, the Java stuff was configured as ....
>>>>
>>>> Java home: /System/Library/Frameworks/JavaVM.framework/Home
>>>> Java arch:
>>> /System/Library/Frameworks/JavaVM.framework/Libraries/libjvm_compat.dylib
>>>> Java CPPFLAGS: -I/System/Library/Frameworks/JavaVM.framework/Home/include
>>>> Java libraries: -framework JavaVM
>>>>
>>>> "Java home" is a symbolic link.
>>>>
>>>> $ ls -l /System/Library/Frameworks/JavaVM.framework/Home
>>>> lrwxr-xr-x 1 root wheel 24 Oct 21 20:46
>>> /System/Library/Frameworks/JavaVM.framework/Home -> Versions/CurrentJDK/Home
>>>> With your change, I get ....
>>>>
>>>> Java home:
>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>>> Java JVM path:
>>>> Java CPPFLAGS:
>>>> Java libraries:
>>>>
>>>> $ ls -l /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>>> total 8
>>>> drwxr-xr-x 41 root wheel 1394 Oct 21 21:08 bin
>>>> lrwxr-xr-x 1 root wheel 3 Oct 21 20:46 bundle -> ../
>>>> drwxr-xr-x 42 root wheel 1428 Oct 21 21:08 lib
>>>> drwxr-xr-x 41 root wheel 1394 Oct 21 21:08 man
>>>>
>>>> Ben
>>> Ben,
>>>
>>> Could you poke around in the directory
>>>
>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
>>>
>>> and let me know about the following.
>>>
>>> The location of 'java', 'javac', and 'jar'.
>>>
>>> The location of libjvm and its name.
>>>
>>> The location of jni.h
>>>
>>> From the top-level directory try
>>>
>>> find . -name 'java'
>>> find . -name 'javac'
>>> find . -name 'jar'
>>> find . -name '*libjvm*'
>>> find . -name 'jni.h'
>>>
>>> --Rik
>>>
>>>
>> On 10.7 and 10.8:
>>
>> java, javac, and jar are all in
>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
>>
>> jni.h is
>> /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h
> Is there a symlink at
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK that points
> to 'A'?  It seems from the directory structure that you might have
> Versions/A, Versions/B, ... with a symlink pointing to the currently chosen
> one.  Otherwise, I can hardcode
> "/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" as a
> search path.
> 
> --Rik
> 

10.6 - 10.8 (some details differ):

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
lrwxr-xr-x  1 root  wheel   10 Oct 18 12:21 1.4 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 12:21 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 12:21 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 12:21 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 12:21 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Oct 18 12:21 1.6.0 -> CurrentJDK
drwxr-xr-x  8 root  wheel  272 Oct 18 12:21 A
lrwxr-xr-x  1 root  wheel    1 Oct 18 12:21 Current -> A
lrwxr-xr-x  1 root  wheel   59 Oct 18 12:21 CurrentJDK ->
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

10.5/powerpc

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
total 32
lrwxr-xr-x 1 root wheel   5 Jun 28  2011 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Sep 28  2007 1.3.1
lrwxr-xr-x 1 root wheel   5 Sep  3  2009 1.4 -> 1.4.2
lrwxr-xr-x 1 root wheel   3 Dec 23  2007 1.4.1 -> 1.4
drwxr-xr-x 8 root wheel 306 Dec 24  2007 1.4.2
lrwxr-xr-x 1 root wheel   5 Jun 28  2011 1.5 -> 1.5.0
drwxr-xr-x 8 root wheel 306 Dec 24  2007 1.5.0
lrwxr-xr-x 1 root wheel   5 Jun 28  2011 1.6 -> 1.6.0
lrwxr-xr-x 1 root wheel  59 Jun 28  2011 1.6.0 ->
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
drwxr-xr-x 8 root wheel 374 Jun 28  2011 A
lrwxr-xr-x 1 root wheel   1 Jun 28  2011 Current -> A
lrwxr-xr-x 1 root wheel   3 Jun 28  2011 CurrentJDK -> 1.5

10.5/Intel is different, but I'm away from my machine.

-- 
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]