Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-12-2004, 11:27 PM   #1
LQ Newbie
Registered: Aug 2003
Location: Kansas City
Distribution: college linux
Posts: 23

Rep: Reputation: 15
Unhappy java woes

I downloaded and installed the java sdk from sun's website and chose the self extracting .bin file. The file ran and apparently installed fine, because I have all of the files the site said I should have. I moved the extracted directory into /usr/local and modified /etc/profile to include the bin directory containing the "java" and "javac" commands. However Neither command works in root or otherwise. In root when I attempt to run javac on a .java file I get the following error message.
"Error occured during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object"
Anybody know how to fix this?
Old 01-13-2004, 01:44 AM   #2
Senior Member
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Rep: Reputation: 146Reputation: 146
you say you moved the directory into /usr/local?

does this mean you ran the installer as user and not as root?

run it as root and it should install itself to where it ought to go,
you shouldn't have to copy anything anywhere
Old 01-13-2004, 07:25 AM   #3
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 417Reputation: 417Reputation: 417Reputation: 417Reputation: 417
You say you modified the profile PATH to include the java /bin directory, but did it take? If you type $PATH at a command prompt, that ought to show you if the path is set properly.

The other possibilty is that you need to set your CLASSPATH environment variable to point to the java directory. You can test if this is the problem by using the -classpath flag when run javac:

javac -classpath=./:/path/to/java

Be sure to include the ./ bit, otherwise javac won't find the .java file you're trying to compile.


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
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 02:13 AM
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
Web start java not working (java works fine) powadha Debian 5 06-05-2004 12:57 PM
2 Questions: java calling system commands? PERL vs Java? randomx Programming 28 11-28-2003 08:24 PM
My Java woes (Help!!) TippyToes Linux - General 5 06-23-2003 03:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:55 AM.

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