Ignazio Palmisano ignazio_io at
Thu Sep 11 20:51:27 BST 2008

Nigel Ridley wrote:
> I'm trying to run multivalent from the command line but get this error:
> nigel at laptop:~/Downloads/Multivalent$ java tool.pdf.Compress -noalt Sept-08-print-EN.pdf
> Exception in thread "main" java.lang.NoClassDefFoundError: tool/pdf/Compress
> Caused by: java.lang.ClassNotFoundException: tool.pdf.Compress
>          at$
>          at Method)
>          at
>          at java.lang.ClassLoader.loadClass(
>          at sun.misc.Launcher$AppClassLoader.loadClass(
>          at java.lang.ClassLoader.loadClass(
>          at java.lang.ClassLoader.loadClassInternal(
> Could not find the main class: tool.pdf.Compress. Program will exit.
> I tried the following (according the the Multivalent website):
> Tools all live in the file Multivalent.jar, and that file is made visible to Java by adding its 
> path to your CLASSPATH environment variable. For example, for UNIX (including Mac OS X and 
> Linux), depending on your shell, setenv CLASSPATH $CLASSPATH:/path/to/Multivalent.jar or export 
> CLASSPATH=$CLASSPATH:/path/to/Multivalent.jar.
> But I get error messages trying to run the above:
> nigel at laptop:~$ sudo setenv CLASSPATH $CLASSPATH:/home/nigel/Downloads/Multivalent/Multivalent.jar
> sudo: setenv: command not found
> nigel at laptop:~$ sudo export CLASSPATH=$CLASSPATH:/home/nigel/Downloads/Multivalent/Multivalent.jar
> sudo: export: command not found
> They also suggest:
> Alternatively, you can set the classpath explicitly as an option, as in
>      java -classpath /path/to/Multivalent.jar tool.XXX [options] files
> but I don't understand the '[options] files' part.

[options] are the options for the java program. In your case, -noalt 
Sept-08-print-EN.pdf, as in your original command line

> How can I set the classpath so as to get multivalent to run?

I have used export in script files, e.g. .bashrc

> Yes I have enabled the 'executable' option under 'Permissions' on the actual Multivalent.jar file.

Should not be needed.

More information about the kubuntu-users mailing list