-   Linux - Newbie (
-   -   Java programs (

adcripps 03-03-2002 04:21 PM

Java programs
I have a couple of Java programs (Jext being one of them) that I want to run. I thought I'd installed j2sdk, but I get an error when I try and run jext

Couldn't find or load essential class `java/lang/Object' java.lang.NoClassDefFoundError java/lang/Object

Is this a classpath thing, and if so, how do I remedy it?


neo77777 03-03-2002 11:53 PM

Did you point you PATH env variable to java executable, if not you should update it. in your .bash_profile file (if you use bash as your shell) append the following to your PATH

vance 03-04-2002 01:03 PM

yes its the classpath
yes, you have to set up your classpath to include the directory of your program. if you use bash (default on many distros), edit the .bashrc file in your home directory. i added the line below to get my program working:

export CLASSPATH=$CLASSPATH:/home/vance/myapp/:/usr/share/pgsql/jdbc7.0-1.2.jar

the $CLASSPATH just makes sure that if the variable is being setup somewhere else that my line gets appended instead of deleting the existing one. the ":" separates the entries. my reference to the ".jar" file is necessary for using it for programming and running my database stuff. if you have a .jar, you have to include the whole file name and not just the directory it is in.

good luck!

ps: the export is on the same line as the classpath argument. it just broke there in this message because of text wrapping.

All times are GMT -5. The time now is 05:53 PM.