macosx-port-dev Digest, Vol 26, Issue 19
Jamison Hope
jrh at theptrgroup.com
Thu Feb 21 08:10:44 PST 2013
On Feb 21, 2013, at 10:27 AM, Yannick Jestin <yannick.jestin at enac.fr> wrote:
>> Then I wanted to execute the application JDownloader who asked for (Apple 1.6 ?) java.
>>
>> Then, I fired the terminal, typed java -version and get:
>> No Java runtime present, requesting install.
>>
>> And I promptl saw a new window that asked if I wanted to install java se 1.6.
>>
>> What do I do wrong ?
>
> This has been discussed a few times on this mailing list, and google(java7 command line macosx). The java preference panel seems to have disappeared on Mountain Lion.
>
> if the apple provided java6 is not present on Mountain Lion, the standard behavior is to trigger the download, even there is Oracle java7 on your computer.
>
> The java command line then points to
> $ which java
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java
>
> If you want to use java7, with or without downloading apple java6, you can execute
> $ export PATH=$(/usr/libexec/java_home)/bin:$PATH
> $ which java
> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/bin/java
I don't think that's entirely accurate. I've never installed Apple Java 6 on my ML machine and /usr/bin/java finds the newest Oracle Java 7 in /Library/Java/JavaVirtualMachines/ just fine, no PATH changes required:
$ /usr/bin/java -version
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
I don't recall having to do anything special the first time, either, but that was several months ago.
OTOH, I do still see the occasional dialog asking me to install Java 6, I think that's triggered by applications that link against the deprecated JavaVM.framework or are otherwise incompatible with Java 7 (e.g. are 32-bit or have hard-coded dependencies on old paths).
--
Jamison Hope
The PTR Group
www.theptrgroup.com
More information about the macosx-port-dev
mailing list