PDA

View Full Version : java/lang/object problem



Anonymous
05-31-2002, 04:43 AM
Hi all,

currently i'm trying to install JFreeReport on my Linux box (running Mandrake 8.1 with j2sdk1.4.0).
When i ran the demo from command line as the documentation suggest from my jfreereport-0.7.2 directory :
java -classpath jfreereport-0.7.2.jar:pixie.jar:libs/jcommon-0.6.1.jar:libs/iText.jar:libs/gnujaxp.jar:./resources com.jrefinery.report.demo.JFreeReportDemo, i'll get the error said :
"Couldn't find or load essential class 'java/lang/Object' java.lang.NoClassDefFoundError"

Some body can help me with the problem ??



TIA

-toto-

Anonymous
05-31-2002, 09:26 AM
It seems that java is unable to locate its home directory.

try this command:

set | grep JAVA_HOME

if this prints out a line like

JAVA_HOME=/usr/lib/java

then everything should be ok, and then you can skip the next paragraph.
If not, then try to enter the following:

which java

This should print something like "/usr/lib/java/bin/java" when java is reachable by the PATH variable. Just ignore the last "/bin/java" and set the
java home to (in this case) "/usr/lib/java" using the command

export JAVA_HOME=/usr/lib/java

Now try to run the program. If it is ok, then well, skip the rest,
if not try this:

in this java directory (/usr/lib/java) should be a directory called
/usr/lib/java/jre/lib which contains the file rt.jar

add this jar file to your classpath,

java -classpath /usr/lib/java/jre/lib/rt.jar:...

Again try to run the program.

If everything is ok, then you may want to add the
following lines to your startup scripts (/etc/profile (systemwide) or ~/.profile (user specific).

export CLASSPATH=/usr/lib/java/jre/lib/rt.jar
export JAVA_HOME=/usr/lib/java

Have more fun,
said Thomas