LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-03-2002, 04:21 PM   #1
adcripps
Member
 
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103

Rep: Reputation: 15
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?

Thanks
 
Old 03-03-2002, 11:53 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
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
:/your/java/dir/bin
 
Old 03-04-2002, 01:03 PM   #3
vance
Member
 
Registered: Feb 2001
Location: San Francisco
Distribution: Mandrake 8.1 modified
Posts: 80

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling java programs in FedoraCore1 koodoo Programming 3 02-20-2006 02:05 AM
can't run my java programs crazyzombie Linux - Newbie 1 09-23-2005 01:42 PM
Opening programs in Java Diederick Programming 6 06-27-2005 03:58 PM
Problem executing java programs nro Programming 2 08-28-2004 01:09 AM
how to acutally use java programs? veritas Programming 15 02-24-2004 09:08 AM


All times are GMT -5. The time now is 01:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration