I upgraded to the latest Java 7 u40 on MacOS X and started getting the following message on the console when launching my application using Eclipse. The app works fine but I would like to find out the cause of the problem and hopefully a fix for it.
objc[10012]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Does anyone know why this message is printed and how to fix it?
jdk-7u80-macosx-x64.dmg fix this problem.
As other answers detail, this is a bug in the JDK (up to u45) which will be fixed in JDK7u60 - while this is not out yet, you may download the b01 from here:
https://jdk7.java.net/download.html
It's beta, but fixed that issue for me.
As of October 2017, this issue is now resolved in
Install Java 7u21 from here: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u21-oth-JPR
set these variables:
Run your app and fun :)
Well, after some struggling, what worked for me was completely removing the current JDK, as described here:
Then installed 1.7.0_21, after downloaded from here.
Now a
java -version
prompts:If you're using IntelliJ & Mac just go to Project structure -> SDK and make sure that there is Java listed but it points to sth like
Rather than user home...