views:

2128

answers:

2

I'm trying to add a directory to the classpath of an application run profile

If I override by using -cp x:target/classes in the VM settings, I get the following error:

java.lang.NoClassDefFoundError: com/intellij/rt/execution/application/AppMain

Any idea on how to add a directory to the classpath for my project?

Thanks

+7  A: 

I am using Idea 8. in your module dependancies tab (in the project structure dialog). Add a "Module Library". There you can select a Jar Directory to add. Then make sure the run profile is using the Classpath and JDK of the correct module when it runs (this is in the run config dialog.

Mike Pone
A: 

You can try -Xbootclasspath/a:path option of java application launcher. By description it specifies "a colon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path."

uaaquarius

related questions