Share your knowledge at the LQ Wiki.
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 03-29-2006, 10:38 PM   #1
LQ Newbie
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Question java.lang.ClassNotfoundException

I installed jdk1.5.0 in my Mandrake 10.0


with path and classpath properly
when I type
#]javac works properly

#]java in e shell it works but doesn't seems to catch the class file.
always throws


can any one plese help me to get this properly configured.

Further I have installed netbeans 4.1 and tomcat4.0 that works perfectly. the only problem is e above
Old 03-30-2006, 02:39 AM   #2
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
It sounds to me as though your CLASSPATH environment variable doesn't contain the current directory (i.e. ".").
If the following command works correctly, I'd say this is almost certainly the case:

java -classpath .:$CLASSPATH SomeClass

Hope this helps!
Old 03-31-2006, 07:44 AM   #3
LQ Newbie
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you

I'm sorry I have not stated the error correctly

it is much like this...

//files in my home
//after running

[lakshika@localhost lakshika]$ java testj1
Exception in thread "main" java.lang.NoClassDefFoundError: testj1
[lakshika@localhost lakshika]$

I'll try out your solution and tell you.Right now I’m not in linux


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 exception: java.lang.NoClassDefFoundError kath Programming 12 05-11-2006 05:37 AM
java.lang.NullPointerException ?? dansawyer Linux - Software 5 02-21-2006 12:00 AM
java.lang.NoclassDefFoundError rlnd Programming 5 02-18-2006 05:54 AM
java.lang.InstantiationException: java.sql.Connection poeta_boy Programming 2 07-06-2005 09:26 PM
java.lang.NoSuchMethodException: rulirahm Linux - Networking 2 05-02-2005 02:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 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