• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NoClassDefFoundError

 
Sujoy Choudhury
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I did CounterClockWise setup with Eclipse Indigo (OS: Windows 7) and wrote the first Clojure program. It ran nicely.


But today when I opened my Clojure project and tried to run the same program I am getting this exception.
This must be something silly but being new to Clojure I don't know how to fix it.

java.lang.NoClassDefFoundError: clojure/main
Caused by: java.lang.ClassNotFoundException: clojure.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Exception in thread "main"



 
Sean Corfield
Ranch Hand
Posts: 302
10
Clojure Linux Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the project Build Path (right-click on the project name in the navigator and go Build Path > Configure Build Path... if that's present or Properties, then Java Build Path, otherwise). Sounds like the Clojure JAR is missing.
 
Sujoy Choudhury
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sean, that resolved my issue. I am slowly getting the hang of it.
I found the reason which caused this issue.
I accidentally installed Maven in this Clojure project (I don't know about Maven).
And that did remove all the required jar files from build path.
Let me figure out how does pom.xml works.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic