944,094 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 8307
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Apr 6th, 2007
0

Path setting problem in jdk1.5

Expand Post »
Hi,
After installing jdk1.5 my program is compling but at the time of execution its giving error as Exception in thread main java.lang.NoClassDefFound error.I think it is problem of classpath.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abhijeet_raj is offline Offline
1 posts
since Apr 2007
Apr 6th, 2007
0

Re: Path setting problem in jdk1.5

>I think it is problem of classpath.

Well have you set it properly?
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Apr 21st, 2007
-1

Re: Path setting problem in jdk1.5

actually ur O.S. is not recognizing the ".java" file format........

u have to sort that out first....

if u are using windows...go to windows explorer.....create a new extension as ".java"

u will get it....
Reputation Points: 9
Solved Threads: 1
Junior Poster in Training
indianscorpion2 is offline Offline
82 posts
since May 2005
Apr 21st, 2007
0

Re: Path setting problem in jdk1.5

actually ur O.S. is not recognizing the ".java" file format........

u have to sort that out first....

if u are using windows...go to windows explorer.....create a new extension as ".java"

u will get it....
Please ignore this answer it is wrong, iamthwee is right for more instruction follw the link bellow
http://java.sun.com/j2se/1.5.0/docs/...classpath.html
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004
Apr 22nd, 2007
0

Re: Path setting problem in jdk1.5

you actually understood that highly cryptic message?
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
May 2nd, 2007
0

Re: Path setting problem in jdk1.5

Here I am giving a scenario to set class path

suppose jdk is installed in c;/java/jdk1.5

then follow the below three steps to set class path

set JAVA_HOME=C:\Java\jdk1.5.0_07

set path=;%path%;%JAVA_HOME%\bin

set classpath=%classpath%;%JAVA_HOME%\lib\tools.jar
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bhavanivishnu is offline Offline
1 posts
since May 2007
May 2nd, 2007
0

Re: Path setting problem in jdk1.5

Here I am giving a scenario to set class path

suppose jdk is installed in c;/java/jdk1.5

then follow the below three steps to set class path

set JAVA_HOME=C:\Java\jdk1.5.0_07

set path=;%path%;%JAVA_HOME%\bin

set classpath=%classpath%;%JAVA_HOME%\lib\tools.jar
If Java is installed in c:/java/jdk1.5 (and I am assuming it is c: and not c; as posted) then JAVA_HOME should be c:/java/jdk1.5 and not C:/Java/jdk1.5.0_07
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Jun 8th, 2008
0

Re: Path setting problem in jdk1.5

Does this work?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
CAESARIO is offline Offline
6 posts
since Jun 2008
Jun 8th, 2008
0

Re: Path setting problem in jdk1.5

Click to Expand / Collapse  Quote originally posted by CAESARIO ...
Does this work?
Which part you did not understand?
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004
Jun 8th, 2008
0

Re: Path setting problem in jdk1.5

Peter Buso.
i just copy pasted... after tens of attempts not working..
This worked FAST. in one go.
I'm not getting what worked. But it did.

thanks.
Last edited by CAESARIO; Jun 8th, 2008 at 3:05 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
CAESARIO is offline Offline
6 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Create hibernate.cfg.xml while program is running
Next Thread in Java Forum Timeline: Exiting 1 out of 2 JFrames using a JButton?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC