I am trying to set up my first scala elevator project in Eclipse and it is not easy (TM).
What I did was set up the project through Maven with
mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic_2.9.1 \ -DarchetypeVersion=2.4-SNAPSHOT \ -DarchetypeRepository=http://scala-tools.org/repo-releases \ -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT
Then I created an eclipse project from this using mvn eclipse:eclipse (because it is hellish to figure out all the dependencies and add them all to the build path manually)
Then the project conflicts with the installed version of scala. So I removed the three existing scalalang references from the build path and added my own scala to the build path. I am using scala 2.9.0.
Now the project can be built, but when I try to run RunWebApp, an exception is thrown:
Exception in thread "main" java.lang.NoClassDefFoundError: RunWebApp Caused by: java.lang.ClassNotFoundException: RunWebApp at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: RunWebApp. Program will exit.
I know the answer to the Scala -Lift project in Eclipse scala IDE errors , asking me to ask the question http://groups.google.com/group/scala-ide-user , but I was hoping someone here could point me to answer so that someone else with the same problem can find the answer too
source share