5
  • When I look at System Preferences > Java > Update, I see

    Your system has the recommended version of Java.
    Java 7 Update 79

  • From Terminal, java -version:

    java version "1.7.0_71"
    Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

  • From Terminal, export:

    JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home"

  • In addition to that, I also have the Java from Apple/Oracle installed as well (when first prompted to install when opening a Java-based app when there's no Java yet installed)

Questions:

  1. Is Java 7 Update 79 == jdk1.7.0._71.jdk? Or are these separate?
  2. When running some thing with Java, there is always the following:

    objc[63077]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

I'd be more than willing starting from scratch had I understood the steps to do that properly (remove, re-install). If it matters, am running OS X 10.10.

1

2 Answers 2

3

System Preferences shows the Java used for web applets and java -version the one found by /usr/bin/java

To get the latter install the JDK not the JRE

9
  • Okay. Downloading "Java SE Development Kit 7u79" for OS X.
    – Idan Adar
    May 23, 2015 at 8:12
  • After installing it, "java -version" still shows _71. I suppose that is because of the JAVA_HOME path?
    – Idan Adar
    May 23, 2015 at 8:14
  • We need to get more accurate on the correct download path Oracle has really messed this yp
    – mmmmmm
    May 23, 2015 at 8:16
  • After updating JAVA_HOME, "java -version" now showing _79, so that's up-to-date now. However the error mentioned in question #2 remains.
    – Idan Adar
    May 23, 2015 at 8:16
  • 1
    This is a horrible bug.. it wont go away
    – Tyler
    Oct 27, 2015 at 14:56
0

The following generally works for Java, versions 8 through 17.

brew install java may not be the best way to install Java.

Java JDK should be unzipped into a folder identifying it, withing /Library/Java/JavaVirtualMachines . I usually either manually download JDK and unzip it into the above folder OR install it via jenv command. The former gives you more control.

Then you should have jenv installed and have this in your .bash_profile :

export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"

Don't install Java with brew . Instead: brew install jenv . Then, install Java (OR link to your installed java) using jenv.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .