Exception in thread "main" java.lang.NoClassDefFoundError

Dear IDEA community,

I am a new user of IDEA and found it really powerful. I recently have a issue on my simple script using external libraries.

I have added the external libraries into the library path using JAR file, we I can see them on the left panel of my project, as shown in the attached screenshot. The script is compiled without problems, but when i run the class, errors come out:

LearnJava$ java PipeLineFastQ INPUT=A_TGACCA_L001_R1_001.fastq.gz OUTPUT=vv.fastq
Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/picard/fastq/FastqReader
    at PipeLineFastQ.main(PipeLineFastQ.java:39)
Caused by: java.lang.ClassNotFoundException: net.sf.picard.fastq.FastqReader
    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)
    ... 1 more

Please help me to figure out what's the problem.

Regards,

Jiantao



Attachment(s):
Library and script.png
Add to the path.png
1 comment
Comment actions Permalink

Sorry, Please ignor this thread, the problem is resolved. I haven't set the classpath correctly.

0

Please sign in to leave a comment.