Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm at a complete loss here. I have a project on an external hard drive called LenseProject. Inside LenseProject, I have .idea, lib, Natives and SRC folders. I also have a number of text files for reading.

When I left work last night, this all worked fine. Coming in this morning, I'm met with:

Exception in thread "main" java.lang.ClassNotFoundException: QuadTest
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:188)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113) 

QuadTest being the main class.

Information that I think might be helpful:

  • If I comment out the imports, I get the appropriate error messages. (Cannot find symbol, etc).

  • I have 9 dependencies, located in liblwjgl-2.9.0jar that are set up in Project Structure -> Libraries.

  • The module has LenseProject as the content root, and SRC as the source folder.

  • The language level is 7.0

  • I have the dependencies set to export in Project Structure -> Modules -> Dependencies.

  • In Compiler Output, I have it set to Use Module Compile Output Path, as Inherit Project Compile Output Path gave me "Cannot start compilation: The output path is not specified for module "LenseProject". Specify the output path in Configure Project.

  • I have VM option -Djava.library.path=Natives.

  • I can compile and run the program through command prompt no problem.

  • I was missing my configure options when I started it up this morning. I had to set the SDK again, and libraries.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
240 views
Welcome To Ask or Share your Answers For Others

1 Answer

Open your Idea File --> Project Structure --> Modules ,and then choose problematic module,in the "Paths" tab change selected to "Use module compile output path ".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...