Set classpath in Java for fastqc
0
1
Entering edit mode
8.3 years ago

Hi, I was trying to use fastqc to check the sequencing quality of my sample. When I tried to use: "fastqc" I got error like:

Exception in thread "main" java.lang.NoClassDefFoundError: uk/ac/bbsrc/babraham/FastQC/FastQCApplication
Caused by: java.lang.ClassNotFoundException: uk.ac.bbsrc.babraham.FastQC.FastQCApplication
    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:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)

Could not find the main class: uk.ac.bbsrc.babraham.FastQC.FastQCApplication. Program will exit.

I searched, some one suggested that in similar case, I need to set the class path to the directory which contains FastQC installation:

and depending on having a standard class path or non-standard classpath on my machine, I need to append existing classpath like:

java -Xmx250m -classpath /usr/local/FastQC uk.ac.bbsrc.babraham.FastQC.FastQCApplication

or

java -Xmx250m -classpath /usr/local/FastQC:$CLASSPATH uk.ac.bbsrc.babraham.FastQC.FastQCApplication

Since my directory which contains the FastQC is /u32/myusername/Tool/FastQC

so I tried both:

java -Xmx250m -classpath /u32/myusername/Tool/FastQC uk.ac.bbsrc.babraham.FastQC.FastQCApplication

and

java -Xmx250m -classpath /u32/myusername/Tool/FastQC:$CLASSPATH uk.ac.bbsrc.babraham.FastQC.FastQCApplication

but none of them seemed to work.

Did I mess something up? I am not sure about what "-Xmx250m" means, with or without it, the path setting did not work. Any idea or suggestion appreciated.

sequencing next-gen • 3.5k views
ADD COMMENT
0
Entering edit mode

The Xmx part tells Java the amount of heap space it can use (memory).

Are you using a recent version of FastQC and java?

ADD REPLY
0
Entering edit mode

Hi, WouterDeCoster, thanks for your response. For Xmx, I see. then i guess it should not be the problem.

Here is the version information of FastQC and java runtime environment: java version "1.6.0_39" OpenJDK Runtime Environment (IcedTea6 1.13.11) (rhel-1.13.11.0.el5_11-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) the java version seems to meet the minimal requirement of fastqc.

RELEASE NOTES FOR FastQC v0.11.5 the FastQC is the most recent release, I believe. Kindly let me know if you have any thought.

ADD REPLY
0
Entering edit mode

Well can't see anything wrong with that, while waiting for other replies you could try updating java :p That won't hurt.

ADD REPLY
0
Entering edit mode

@WouterDeCoster, It seemed to me that to update the java, I need to use "su" or "sudo" command (http://openjdk.java.net/install/index.html) which I could not to use. if that is not the case, please kindly let me know. Tsk.

ADD REPLY
0
Entering edit mode

Should be possible, if you google for install java without sudo there are some stackoverflow hits.

ADD REPLY

Login before adding your answer.

Traffic: 1984 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6