PDA

View Full Version : Setting path on WinXP



Yohhan
04-19-2002, 07:51 AM
How do I add onto the path in WinXP? I went into control panel->system and edited the environmental path variable, adding the directory I wanted to the end, and saved, and reset my computer. However, when I view the path in the DOS prompt, it doesn't show the directory I added. I'm trying to add the java SDK bin directory to the path so I can compile in the DOS prompt without having to type out the full path of the javac.exe file.

Here's what my path variable value looks like, though it doesn't appear to add the last addition I made:

%SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\sy stem32\WBEM;C:\j2sdk1.4.0\bin


Thanks in advance for any help.

Yohhan
04-19-2002, 07:59 AM
Why is it that in the DOS prompt (on WinXP) I use "dir" and see the directory "Program Files", but when I try to change to that directory (cd Program Files) the directory can't be found? I tried "Progra~1" insead (rememberd from previous versions of win) and I got into the Program Files directory.

Why is dir showing me directory names that I can't open? Why does dir not show "Progra~1", the directory I can actually open, as opposed to "Program Files" which I can't?

Hopefully that wasn't too ambiguous... Thanks for the help.

SegiY
04-19-2002, 08:47 AM
To your second question: IT CALLED DOS! it only supports 8 letter long names.

Beefy
04-19-2002, 08:59 AM
With the second question, when using commands in DOS, or most Command Line Interfaces, when there is a space it usually means there will be a parameter following.. So when you put the space in between Program Files, it thinkgs that you are trying to use a parameter Files, which doesn't exist for the dir command...

Darthtanion
04-19-2002, 09:35 AM
Something else to consider (and this may very well tie into your first question) is that WinXP does not have a true DOS capability. The command line prompt you get is just that, a command line that will allow you to do some basic troubleshooting. DOS compatibility was removed from the Windows platform as far back as WinME.

This could also explain why you cannot set a standard PATH statement in your command line. This statement was normally given in the autoexec.bat file from years past.

Jonny
04-19-2002, 04:52 PM
i use jdk myself and i have no problems with it.

but i think i see what problem the problem is.

in Enviromental Variables, you have to create a NEW variable and not add if to the existing one.
it will not work if you just add it to the existing PATH (made the same mistake too when i first used it).

When you create a new variable:
put the variable name as PATH
and the variable value as <your directory> C:\j2sdk1.4.0\bin

i think you only need to put in in the systems variables but i have also placed another variable in the USERS section.

hope that fixes it

Yohhan
04-21-2002, 12:12 PM
I realize that DOS only supports 8 letter filenames. The problem is, when I dir, it shows "Program Files" as a directory (which I can't access by typing cd Program Files). In previous versions of windows, it'd shorten the name to something like: Progra~1.


Thanks for the help with the path, I'll try out your suggestions.

Darthtanion
04-22-2002, 03:35 AM
It shows the full directory name because it isn't a true DOS environment, just an emulator that WinXP sets up. Since it still tries to emulate DOS, it doesn't work with the full directory name.

Yohhan
04-22-2002, 11:30 AM
So is there anyway to get "dir" to show the workable directory names? Seems like it makes any dos prompt at all rather pointless.

Beefy
04-22-2002, 11:38 AM
I think this is Microsoft's subtle way of saying 'Let go of DOS'....
:(

Ewen
04-22-2002, 06:06 PM
Why am I not having aproblem with this? I have just navigated through all the folders from the root directory upwards and finally typing: cd Documents and Settings, exactly as the directory is named and then looking at the contents!

Yohhan
04-23-2002, 04:57 AM
is your filesystem FAT32 or NTFS? Apparently, FAT32 doesn't support longer filenames and that's what I'm on:-( Still seems pretty weak on MS's part not to give me a way to navigate folders through DOS.