Problem with java

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2005
Posts: 18
Reputation: manisha is an unknown quantity at this point 
Solved Threads: 0
manisha manisha is offline Offline
Newbie Poster

Exception in thread "main".lang.NoClassDefFoundError:

 
0
  #1
Jun 16th, 2005
Hi friends

I m new to this site.
I have got a problem.
I cant run Java program on my PC.
If anyone can help plz reply.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Problem with java

 
0
  #2
Jun 16th, 2005
Check your environment variables:
I posted this in a previous thread:

  1. Considering you have windows:
  2.  
  3. Goto start--->right click on my computer--->select properties
  4. Goto the advanced tab, and you should see a button at the bottom that says environment variables...click on that.
  5.  
  6. The only thing you need to worry about is the PATH variable, and the CLASSPATH variable, nothing else.
  7.  
  8. SKIP THIS STEP AND GO ON TO THE CLASSPATH, IF IT DOESN'T WORK AFTER SETTING THE CLASSPATH, THEN COME BACK AND SET THIS.
  9. The path variable must point to the bin folder in the sun app server, and the bin folder in the jdk directory. Now, those are two different directories, so you seperate them with a semicolon when creating it. Here is what mine looks like:
  10.  
  11. C:\Sun\AppServer\bin;C:\Program Files\Java\jdk1.5.0\bin
  12.  
  13.  
  14.  
  15.  
  16. Classpath....This points to the tools.jar file in the jdk directory. It's pretty easy to find. Here is what mine looks like:
  17.  
  18. .;%classpath%.;C\Program Files\Java\jdk1.5.0\lib\tools.jar
  19.  
  20. Your's will look similar, although you do not need the .;%classpath%.; statement.
  21.  
  22.  
  23. Next, you need to know how to access your files at the command line.
  24.  
  25. To do so, you simply type cd/folderName at the command line. The cd stands for current directory. My folder was named javawork, so to access it, I did this at the command prompt:
  26.  
  27. cd/javawork // brings me to the right directory
  28. javac Hello.java //compiles my program
  29. java Hello //runs my program
  30.  
  31.  
  32. Let me know if you don't undestand something or need more help.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Problem with java

 
0
  #3
Jun 17th, 2005
Hi everyone,

Originally Posted by server_crash
Check your environment variables:
I posted this in a previous thread:

  1. Considering you have windows:
  2.  
  3. Goto start--->right click on my computer--->select properties
  4. Goto the advanced tab, and you should see a button at the bottom that says environment variables...click on that.
  5.  
  6. The only thing you need to worry about is the PATH variable, and the CLASSPATH variable, nothing else.
  7.  
  8. SKIP THIS STEP AND GO ON TO THE CLASSPATH, IF IT DOESN'T WORK AFTER SETTING THE CLASSPATH, THEN COME BACK AND SET THIS.
  9. The path variable must point to the bin folder in the sun app server, and the bin folder in the jdk directory. Now, those are two different directories, so you seperate them with a semicolon when creating it. Here is what mine looks like:
  10.  
  11. C:\Sun\AppServer\bin;C:\Program Files\Java\jdk1.5.0\bin
  12.  
  13.  
  14.  
  15.  
  16. Classpath....This points to the tools.jar file in the jdk directory. It's pretty easy to find. Here is what mine looks like:
  17.  
  18. .;%classpath%.;C\Program Files\Java\jdk1.5.0\lib\tools.jar
  19.  
  20. Your's will look similar, although you do not need the .;%classpath%.; statement.
  21.  
  22.  
  23. Next, you need to know how to access your files at the command line.
  24.  
  25. To do so, you simply type cd/folderName at the command line. The cd stands for current directory. My folder was named javawork, so to access it, I did this at the command prompt:
  26.  
  27. cd/javawork // brings me to the right directory
  28. javac Hello.java //compiles my program
  29. java Hello //runs my program
  30.  
  31.  
  32. Let me know if you don't undestand something or need more help.
I could not have said it better myself

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Problem with java

 
0
  #4
Jun 17th, 2005
I could: see the installation instructions
They're quite comprehensive for a variety of platforms.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 18
Reputation: manisha is an unknown quantity at this point 
Solved Threads: 0
manisha manisha is offline Offline
Newbie Poster

Re: Problem with java

 
0
  #5
Jun 17th, 2005
Hi
Thanx for a reply.I hav already tried to set the path and the classpath. But its still not working.by the way
My path is: c:\matlab\bin;c:\bin;C:\Program Files\ESTsoft\ALZip\;C:\Program Files\Java\jdk1.5.0\bin
& the classpath is:"C:\Program files\java\jdk1.5.0\lib\tools.jar"
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Problem with java

 
0
  #6
Jun 17th, 2005
Originally Posted by jwenting
I could: see the installation instructions
Dont be a party pooper!


Anyways, try adding a period to the end of the classpath:

C:\Program files\java\jdk1.5.0\lib\tools.jar.


Get it. Got it. Good.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 18
Reputation: manisha is an unknown quantity at this point 
Solved Threads: 0
manisha manisha is offline Offline
Newbie Poster

Re: Problem with java

 
0
  #7
Jun 17th, 2005
Thanx for ur suggestion.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Problem with java

 
0
  #8
Jun 17th, 2005
Originally Posted by manisha
Thanx for ur suggestion.
did it work?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 18
Reputation: manisha is an unknown quantity at this point 
Solved Threads: 0
manisha manisha is offline Offline
Newbie Poster

Re: Problem with java

 
0
  #9
Jun 21st, 2005
Originally Posted by server_crash
did it work?
Thanx for ur help but it havnt worked yet.
I dont know what the hell is the problem here.
It did work one yr back but now i m unable to work it out.
anyways thanx.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Problem with java

 
0
  #10
Jun 21st, 2005
You should have let me know that it still wasn't working. These problems can take a while to fix.

Now, if you tried putting the period at the end of the .jar extension(.jar.) and it didn't work, try adding this at the VERY beginninng:

  1. .;%classpath%.;
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC