rajdeokumarsingh / slug-semweb-crawler

Automatically exported from code.google.com/p/slug-semweb-crawler
Other
0 stars 0 forks source link

Cannot find main class #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I cannot run the scutter: after when I execute slug.sh, I get this:

+Exception in thread "main" java.lang.NoClassDefFoundError: 
com/ldodds/slug/Scutter
Caused by: java.lang.ClassNotFoundException: com.ldodds.slug.Scutter
    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:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: com.ldodds.slug.Scutter. Program will exit.

Beforehand I'd run ant in the main directory, and build was successful.

I tried manually adding the libs/ contents to the classpath (instead of using 
the script), and even adding the build/ contents to the classpath. Didn't help.

I'm running Ubuntu Lucid 64 bit, with the Sun JRE/JDK (i.e. not OpenJDK).

Original issue reported on code.google.com by errantli...@gmail.com on 12 Sep 2010 at 9:16

GoogleCodeExporter commented 8 years ago
Same error here (but with slug.bat and windows).
However, I edited the bat:
I have
set CLASSPATH=%CLASSPATH%;build/slug.jar
instead of the equivalent line and it works.

I believe that changing the line:
CLASSPATH=slug.jar
to 
CLASSPATH=build/slug.jar

works as long as you run the shell script locally (it uses relative paths).
Otherwise, you can use absolute paths in the script.

Original comment by enrico.franchi on 5 Nov 2010 at 3:31