LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 10-19-2010, 02:28 AM   #1
Priyadivya
LQ Newbie
 
Registered: Oct 2010
Posts: 2
Blog Entries: 1

Rep: Reputation: 0
Java runtime error. Exception in thread "main" java.lang.NoClassDefFoundError: /


Hi

I tried compiling a sample java program in jdk/bin and its working fine in linux box.
I need to run this java program in a different location.
I have set PATH and classpath. But whil running , i get Exception in thread "main" java.lang.NoClassDefFoundError: /
1. javac -classpath <gave the required jar file path here separated by :> Test.java
2. java -classpath <gave the required jar file path here separated by :> . Test

Please help me
 
Old 10-19-2010, 02:52 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Common problem.

Especially if you're using packages (which, in general, you definitely should).

It would help if you cut/pasted the full error message. But I think you should be able to figure it out from one of these links (search for "java.lang.NoClassDefFoundError" in each of them):

http://www.jarticles.com/package/package_eng.html

http://forums.sun.com/thread.jspa?threadID=5435982

http://www.java-forums.org/new-java/...ounderror.html

http://download.oracle.com/javase/tu...gingfiles.html
 
1 members found this post helpful.
Old 10-26-2010, 06:01 AM   #3
Priyadivya
LQ Newbie
 
Registered: Oct 2010
Posts: 2
Blog Entries: 1

Original Poster
Rep: Reputation: 0
Hi

The pacakge name was missing in the classpath.
Now added and is running fine
 
  


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
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature canonas Linux - Software 3 06-16-2008 05:00 AM
Exception in thread "main" java.lang.NoClassDefFoundError: LinuxNewbie999 Programming 2 03-24-2008 01:12 AM
Java error "Exception in thread "main" java.lang.StackOverflowError" nro Programming 1 09-04-2004 04:47 AM
Exception in thread "main" java.lang.NoClassDefFoundError: Lobais Linux - Software 19 06-23-2004 09:42 AM
Exception in thread "main" java.lang.NoClassDefFoundError: melinda_sayang Programming 2 04-27-2004 12:49 PM


All times are GMT -5. The time now is 11:12 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration