LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-09-2006, 03:39 PM   #1
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Rep: Reputation: 30
Jdk


Hello all,
Would someone be able to provide me with a nice step by step to getting a jdk enviroment setup? Right now I cannot run any class files, I get the error: "Exception in thread "main" java.lang.NoClassDefFoundError:".

This happens with blackdown's versions and sun's. There are however no errors when compiling the java code.

Thank you.
 
Old 07-09-2006, 04:08 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
are you giving the right command? to run "foo.class", you do "java foo"
 
Old 07-09-2006, 06:15 PM   #3
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Original Poster
Rep: Reputation: 30
Yes that is when I recieve the error.
 
Old 07-09-2006, 06:21 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
could you post the code in code tags?
 
Old 07-09-2006, 06:35 PM   #5
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
I guess you are putting package statements in your code when you start writing.
Code:
package somePackageName;
If yes, then try compiling without it.
 
Old 07-14-2006, 03:43 PM   #6
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Original Poster
Rep: Reputation: 30
Hmm, when I typed java and then the class file without the .class extension it works just fine! Thank you for the help on this one.

-onelung
 
  


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
how to use JDK in linux Manoj Walia Linux - Software 3 04-08-2005 04:22 AM
JDK installation pogopogo Linux - Software 2 10-19-2004 12:39 AM
getting jdk for linux. tiredoflogins Linux - Newbie 5 10-05-2004 01:23 PM
Slackware 10 + jdk 1.5 jorge.vargas Slackware 3 07-16-2004 01:42 PM
how to use Jdk 1.3.1 in RH 9 Egyptian_Isis Linux - Newbie 1 11-06-2003 04:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:31 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration