| | |
Problem with java
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
Check your environment variables:
I posted this in a previous thread:
I posted this in a previous thread:
Java Syntax (Toggle Plain Text)
Considering you have windows: Goto start--->right click on my computer--->select properties Goto the advanced tab, and you should see a button at the bottom that says environment variables...click on that. The only thing you need to worry about is the PATH variable, and the CLASSPATH variable, nothing else. SKIP THIS STEP AND GO ON TO THE CLASSPATH, IF IT DOESN'T WORK AFTER SETTING THE CLASSPATH, THEN COME BACK AND SET THIS. 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: C:\Sun\AppServer\bin;C:\Program Files\Java\jdk1.5.0\bin Classpath....This points to the tools.jar file in the jdk directory. It's pretty easy to find. Here is what mine looks like: .;%classpath%.;C\Program Files\Java\jdk1.5.0\lib\tools.jar Your's will look similar, although you do not need the .;%classpath%.; statement. Next, you need to know how to access your files at the command line. 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: cd/javawork // brings me to the right directory javac Hello.java //compiles my program java Hello //runs my program Let me know if you don't undestand something or need more help.
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 8
Hi everyone,
I could not have said it better myself
Richard West
•
•
•
•
Originally Posted by server_crash
Check your environment variables:
I posted this in a previous thread:
Java Syntax (Toggle Plain Text)
Considering you have windows: Goto start--->right click on my computer--->select properties Goto the advanced tab, and you should see a button at the bottom that says environment variables...click on that. The only thing you need to worry about is the PATH variable, and the CLASSPATH variable, nothing else. SKIP THIS STEP AND GO ON TO THE CLASSPATH, IF IT DOESN'T WORK AFTER SETTING THE CLASSPATH, THEN COME BACK AND SET THIS. 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: C:\Sun\AppServer\bin;C:\Program Files\Java\jdk1.5.0\bin Classpath....This points to the tools.jar file in the jdk directory. It's pretty easy to find. Here is what mine looks like: .;%classpath%.;C\Program Files\Java\jdk1.5.0\lib\tools.jar Your's will look similar, although you do not need the .;%classpath%.; statement. Next, you need to know how to access your files at the command line. 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: cd/javawork // brings me to the right directory javac Hello.java //compiles my program java Hello //runs my program Let me know if you don't undestand something or need more help.
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
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
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
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:
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:
Java Syntax (Toggle Plain Text)
.;%classpath%.;
![]() |
Similar Threads
- facing problem in database connectivity in java to mysql (Java)
- JNDI/JDBC lookup problem with Sun Java Application Server 8.2 (Java)
- problem in gentoo (Kernels and Modules)
- problem in java (Java)
- Basic help with Java class (Java)
- Printing from java (Java)
- Error message when trying to install Java (Windows 95 / 98 / Me)
- Syntax Analyser and General Java Help (Java)
- calculations in java (Java)
Other Threads in the Java Forum
- Previous Thread: Please help me!!!
- Next Thread: java option for backward compatibility
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation awt binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception fractal ftp game givemetehcodez graphics gridlayout gui html ide image inetaddress input integer j2me japplet java javaprojects jme jni jpanel jtextarea julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle parsing php print problem program programming project projects recursion rim scanner screen server set size smart sms socket sort sortedmaps sql storm string support swing test threads time tree unlimited variablebinding webservices windows







