[Gllug] Java ...
Ian Scott
mriscott at yahoo.co.uk
Thu Oct 28 07:20:57 UTC 2004
>
> I tried installing kaffe, which appears to be free, but it throws some
> sort of stupid CLASSPATH error:
>
> $ java -cp `pwd`/TGWikiBrowser.jar:`pwd`/BrowserLauncher.jar \
> com.touchgraph.wikibrowser.TGWikiBrowser meatball.txt \
> http://www.usemod.com/cgi-bin/mb.pl? hypermedium 2 false
> java.lang.NoClassDefFoundError: /usr/local/src/TGWikiBrowser-1/02/TGWikiBrowser/jar:/usr/local/src/TGWikiBrowser-1/02/BrowserLauncher/jar
> at java.lang.Throwable.<init>(Throwable.java:38)
> at java.lang.Error.<init>(Error.java:21)
> at java.lang.LinkageError.<init>(LinkageError.java:21)
> at java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:21)
>
> Does anyone have any idea what's happening? The TGWikiBrowser.jar
> file exists (but not, obviously, TGWikiBrowser/jar).
>
As I read that error message, it is looking for a class called /usr/local/src/TGwikiBrowser..../jar.
I suspect this means that it has seen the command line, not understood -cp, and
seen the first element of your classpath as a java class to run.
CLASSPATH issues are often a bit wierd, and -cp is particularly nasty,
supported by some jvms and not others. I often find it works better if you
set the CLASSPATH environment variable:
i.e.
$ export CLASSPATH=`pwd`/TGWikiBrowser.jar:`pwd`/BrowserLauncher.jar;
$ java com.touchgraph.wikibrowser.TGWikiBrowser meatball.txt \
http://www.usemod.com/cgi-bin/mb.pl? hypermedium 2 false
Does that work any better for you?
By the way, I assume kaffe supports the right version of the JVM?
> Why is so bloody hard to get these things working ...?
>
Write once, test everywhere.
> Rich.
Ian
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list