Java Preferences won't start
Pranav Bhat
pranav.bhat at oracle.com
Fri May 17 06:16:16 PDT 2013
On May 17, 2013, at 8:49 AM, Anthony Petrov <anthony.petrov at oracle.com> wrote:
> Hello,
>
> My ls -l /Library/Java/JavaVirtualMachines/ looks like this:
>
> total 0
> drwxr-xr-x 3 root wheel 102 Mar 28 2012 1.6.0_31-b04-413.jdk
> drwxr-xr-x 3 root wheel 102 Aug 24 2012 jdk1.7.0_06.jdk
> drwxr-xr-x 3 root wheel 102 Sep 18 2012 jdk1.7.0_10.jdk
> drwxr-xr-x 3 root wheel 102 May 17 15:51 jdk1.8.0.jdk
>
> All the JDKs are usable when I run commands specifying their full path names. Also, the "default" jdk is the 7u10 one, so that running 'java -version' in the command line will say "1.7.0_10". The 1.8 is b90 installed just now.
>
> However, when I'm trying to start Java Preferences in order to select the default JDK for the command-line use, I get a small dialog box with an error saying:
>
> Cannot launch "Java Preferences"
> No compatible version of Java 1.5+ is available.
>
> After I click Quit, the console output is as follows:
>
> [JavaAppLauncher] Requested [1.5+], launching in [(null)] instead.
> [JavaAppLauncher Error] unable to find a version of Java to launch
>
> I tried searching this on the Internet but didn't find anything useful.
>
> I don't even want to run this GUI tool actually. Is there a way to switch the default JDK from command line?
Yes.
/usr/libexec/java_home
See the man pages for java_home at http://www.unix.com/man-page/all/1/java_home/
Thanks,
- Pranav
> (Yes, I know I can modify my PATH and JAVA_HOME, but I actually want to do the same thing that the Java Preferences tool does).
>
> Any tips?
>
> --
> best regards,
> Anthony
More information about the macosx-port-dev
mailing list