Menu

#21 $CLASSPATH must be exported from Unix starter script

open
nobody
None
5
2004-07-08
2004-07-08
Jesse Glick
No

I installed doctorj-5.0.0-1.i386.rpm on Fedora Core 2.
It does not work out of the box:

Exception in thread "main"
java.lang.NoClassDefFoundError: org/incava/doctorj/Main

I found in /usr/bin/doctorj:

if [ -n "$CLASSPATH" ]; then
CLASSPATH="$CLASSPATH:${jarfile}"
else
CLASSPATH="${jarfile}"
fi

This is fine if $CLASSPATH is already an exported
environment variable. If it isn't, setting it does not
make it one. You need to add one line after the ones
quoted above:

export CLASSPATH

Then it runs.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB