Re: Java GUI apps crash



Michael Goerz wrote:

Tony Schlemmer wrote:
Michael Goerz wrote:

Hi,

All of my GUI-Java apps started to not work recently. I'm getting this
error message in every case:

Exception in thread "main" java.lang.Error: can't load
com.birosoft.liquid.LiquidLookAndFeel

I already tried to reinstall Java completely. The system is OpenSuse
10.2, the java version is 1.5.0_10.

Any suggestions?

Michael

Make sure your CLASSPATH includes the JAR or ZIP file that your
com.birosoft.* classes reside in. By default Java only knows how to find
its own classes and 3rd party supplied JAR or ZIP files need to be
manually added to your CLASSPATH.

Tony

The jar-file for Liquid resides in /usr/share/java, so I tried
java -cp /usr/share/java/ -jar program.jar
but it gives the very same error.

Besides, shouldn't the path be in an environment variable $CLASSPATH?
'echo $CLASSPATH' gives nothing.

Michael


Right and so you need to define an environment variable CLASSPATH unless
you're going to use the JVM "-cp" argument. You need to add the full
directory path and filename for each JAR or ZIP file in the CLASSPATH and
not just reference the directory where the JAR/ZIP files exist.

e.g.

export CLASSPATH=/usr/share/java/jarfile1.jar:/usr/share/java/zipfile1.zip

and so forth.

Tony

--
Anthony Schlemmer
aschlemm@xxxxxxxxxxx
.



Relevant Pages