NoClassDefFound while my plugin executes custom run configuration
Hi,
I wrote a plugin containing a custom RunConfiguration. When the user runs this run configuration, I get the following error:
/usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -Dfelix.auto.deploy.dir=/home/arik/Development/projects/myproj/run/bundles -Dfelix.auto.deploy.action=install,start -Dfelix.fileinstall.dir=/home/arik/Development/projects/myproj/run/deploy -Dfelix.fileinstall.tmpdir=/tmp/felix/hot-deploy -Dfelix.log.level=3 -Dorg.osgi.framework.startlevel.beginning=2 -Dfelix.startlevel.bundle=1 -Dfelix.fileinstall.start.level=2 -Dfelix.cache.rootdir=/tmp/felix -Dorg.osgi.framework.storage=/tmp/felix/cache -Dorg.osgi.framework.storage.clean=onFirstInit -Didea.launcher.port=7533 -Didea.launcher.bin.path=/home/arik/Development/tools/idea-IC-99.18/bin -Dfile.encoding=UTF-8 -classpath /home/arik/Development/tools/felix-framework-3.0.6/bin/felix.jar:/home/arik/Development/tools/idea-IC-99.18/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.apache.felix.main.Main
Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: . Program will exit.
Process finished with exit code 1
The weird thing is, if I copy the command-line above and run it on a terminal it works!
Any help will be appreciated, thanks!
Please sign in to leave a comment.
Nevermind, I found the error: there's an extra space in the command-line. Apparently, that extra-space is considered as the class name hence the exception. I think this an IDEA bug since the same command line on a terminal does not generate this error.