Im running Eclipse Juno on Mac OSX 10.8.4, I tried to update my jdk to 1.7 when I run my Java App and I have this error:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/invoke/MethodHandle
if I run on terminal
java -version
I get this
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
for updating this I set on Eclipse
Window - Preferences - Java - Installed JREs - Duplicate
JRE home: /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
JRE name: Java SE 7 (MacOS X Default)
also changed compiler level
Window - Preferences - Java - Compiler - Compiler compilance level: 1.7
also added next lines to /Users/myUser/.bash_profile:
VA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
export JAVA_HOME=$VA_HOME
export CLASSPATH=$VA_HOME
export PATH=$PATH:$JAVA_HOME/bin
but still getting same error
Any help I'll appreciate
in your launch configuration, check that the right JRE System Library is on the Classpath
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With