Eclipse error: NoClassDefFoundError: java/lang/ref/FinalReference

Qwyrp picture Qwyrp · Feb 26, 2012 · Viewed 10.1k times · Source

I've installed Eclipse for android and that works okay. When I try to start a java-file I got the following error: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/ref/FinalReference

After some research I know it was something with buildpass but after trying I didn't got it to work. I removed it all (Eclipse, Java, Android) and reinstall everything but with the same disapointing result. Could somebody explain to me what to do because what I tried from the internet didn't work for me.

Answer

Arie- picture Arie- · Mar 14, 2012
  1. Find Running configurations -> java application
  2. In the new configuration's Classpath tab, find "Android Library" under Bootstrap Entries and remove it.
  3. Still in the Classpath tab, select Bootstrap Entries and click the Advanced button.
  4. Choose Add Library and click OK.
  5. Select JRE System Library and click Next.
  6. Select Workspace Default JRE and click Finish.

Based on http://www.frickingnutz.com/files/android_pdf/FAQs.pdf