•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 402,750 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,444 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 100109 | Replies: 58
![]() |
•
•
Join Date: Jul 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hey guys here are my Environmental Variable settings same problem as most of you compiles fine but same error at runtime
CLASSPATH C:\j2dk\lib\comm.jar;C:\j2dk\lib\tools.jar;
also tried %classpath%;C:\j2dk\lib\comm.jar;C:\j2dk\lib\tools.jar;
PATH C:\j2dk\bin
tried moving .class file to C:\j2dk\bin but still no joy at runtime
Thank you in advance
Brian
CLASSPATH C:\j2dk\lib\comm.jar;C:\j2dk\lib\tools.jar;
also tried %classpath%;C:\j2dk\lib\comm.jar;C:\j2dk\lib\tools.jar;
PATH C:\j2dk\bin
tried moving .class file to C:\j2dk\bin but still no joy at runtime
Thank you in advance
Brian
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,700
Reputation:
Rep Power: 18
Solved Threads: 195
you should NEVER EVER put classes or jars from the JDK installation in your classpath.
It's not needed and can cause problems.
You SHOULD put the current directory ('.') in there or else pass it as a classpath to the java compiler and runtime always.
If you still get a NoClassDefFoundError you're missing something on your classpath, which will pretty much always be a library you need for some import or other.
It's not needed and can cause problems.
You SHOULD put the current directory ('.') in there or else pass it as a classpath to the java compiler and runtime always.
If you still get a NoClassDefFoundError you're missing something on your classpath, which will pretty much always be a library you need for some import or other.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
•
•
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation:
Rep Power: 9
Solved Threads: 18
•
•
•
•
Originally Posted by jwenting
you should NEVER EVER put classes or jars from the JDK installation in your classpath.
It's not needed and can cause problems.
You SHOULD put the current directory ('.') in there or else pass it as a classpath to the java compiler and runtime always.
If you still get a NoClassDefFoundError you're missing something on your classpath, which will pretty much always be a library you need for some import or other.
You should have said something earlier before I led these people on for 40 posts!!!
•
•
Join Date: Jul 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
To remove all doubt on this issue I said I'd post the following link I found.
http://www.cs.ucsb.edu/~teliot/Path_and_Classpath.htm
It gives a retard proof(well it did work for me) guide to how to properly configure the environmental variables when installing java.
enjoy.
http://www.cs.ucsb.edu/~teliot/Path_and_Classpath.htm
It gives a retard proof(well it did work for me) guide to how to properly configure the environmental variables when installing java.
enjoy.
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,700
Reputation:
Rep Power: 18
Solved Threads: 195
It also has some serious errors...
1) you don't need to restart your computer when you're running XP, NT, or Win2K.
2) you should set JAVA_HOME and refer to that in your path instead of the full installation directory. Many applications expect JAVA_HOME to be set and it also makes upgrading a lot easier
3) of course the actual directory to set depends on the exact JDK version you're using and where you install it.
But apart from that it's a nice checklist
1) you don't need to restart your computer when you're running XP, NT, or Win2K.
2) you should set JAVA_HOME and refer to that in your path instead of the full installation directory. Many applications expect JAVA_HOME to be set and it also makes upgrading a lot easier

3) of course the actual directory to set depends on the exact JDK version you're using and where you install it.
But apart from that it's a nice checklist
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
•
•
Join Date: Oct 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Assuming you are using J2SDK you the class files for lang etc., are in the tools.jar file. You therefore need to add this file to your CLASSPATH.
E.g.,
.;c:\j2sdk1.4.1_02\bin;c:\j2sdk1.4.1_02\lib;c:\j2sdk1.4.1_02\lib\tools.jar
Simply replace j2sdk1.4.1_02 with whichever SDK you are using. Search for the tools.jar file if you are unsure where to look.
E.g.,
.;c:\j2sdk1.4.1_02\bin;c:\j2sdk1.4.1_02\lib;c:\j2sdk1.4.1_02\lib\tools.jar
Simply replace j2sdk1.4.1_02 with whichever SDK you are using. Search for the tools.jar file if you are unsure where to look.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Java Forum
- Previous Thread: Assigning Array Values En Masse
- Next Thread: Q. Lotus Notes + Java?



Linear Mode