Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java/lang/NoClassDefFoundError: java/lang/invoke/MethodHandle eclipse juno

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

like image 666
Jesús Ayala Avatar asked Oct 14 '13 21:10

Jesús Ayala


1 Answers

in your launch configuration, check that the right JRE System Library is on the Classpath

like image 193
ykaganovich Avatar answered Oct 18 '22 18:10

ykaganovich