Quote:
quote:Originally posted by pedr0
No, I was the one who asked a while ago but I am still stucked, and there is no other post asking this question, if you arent answering my question, please, don´t reply.
|
Hello again Pedro, I remember you, you are on the Windows XP platform.
You want to set the classpath, so you can always compile and run your java classes from the MS-DOS prompt. Then the path to the
bin directory where the SDK tools
javac and
java reside will be automatically known to the system.
This is not impossible, but you have to follow my instructions STEP by STEP.
I follow the same steps here and now on my girlfriend's computer, which is a Dutch Windows XP professional. I will supply an English version of all the links I click, while I read the documentation at:
http://java.sun.com/j2se/1.4.2/install-windows.html
and:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html
http://java.sun.com/j2se/1.4.2/docs/...classpath.html
Follow me in my steps carefully:
0. write down the full name of the path where you installed the SDK bin, FOR EXAMPLE:
C:\j2sdk1.4.2_1\bin;
NOTE: end with
;
If you haven´t installed the 1.4.2 SDK yet, visit:
http://java.sun.com/j2se/1.4.2/download.html
You can do yourself a big favor to also install the API DOCS documentation and the source files!
1. write down (or print) these instructions first
2. bottom left: open
Start
3. middle:
Control Panel (Dutch name is "configuration screen")
4. top left: Classic display
5. double-click icon:
System
6. top:
advanced tab
7. bottom:
Environment Variables
8. look for the variable
Path in System Variables (or User Variables)
9. click at the bottom the "edit" function
10. the current path values should be maintained, not deleted,
type in the path to the SDK bin AFTER the system path names,
but make sure it is placed BEFORE any other Java bin already there
11.
OK,
OK,
OK
12. restart, ready!
BUT?
If it still does not work, the first Sun webpage I mentioned might be wrong. Decide this must be so after trying hard to get it working. Then you must use the same procedure with a CLASSPATH variable:
It could be that instead of the
Path you should set the
CLASSPATH variable to point to the bin. Sometimes java programs set their classpath there.
By now you will know how to set it (remember to place the path before any other Java paths)
- First be tidy and remove the old reference in Path.
- Check if the CLASSPATH is available in System Variables (step 8),
if it is not there you can create a new CLASSPATH variable:
- bottom click
new
- enter name of variable:
CLASSPATH
- enter value of variable: the path to the SDK bin
- OK, OK, etcetera
P.S. Please be so kind to write me here with which method you succeeded in getting the javac compiler and java application to run smoothly!
With the Path or the CLASSPATH variable??