Using java from command prompt

Hi, I have used command prompts for a long time, though not recently. But this has never happenned to me, and I may have been using a different OS the last time I really used a command prompt. I am currently running Windows XP.

Anyways, when I try to simply change a directory, you know cd "filename", it tells me:

Parameter format not correct - "filename"

Basically, it won't accept any strings as a parameter. I'm really surprised at this. Is this normal? In any case, I got around this by using the short names for files. For example, I used the name docume~1 instead of "documents and settings".

Then, when I got to the folder where my java files were stored, it told me it was an invalid directory but nonetheless allowed me to use it. However, no commands worked except for cd..

Java did not work, nor did basic commands like dir or help. Do you have any idea what is wrong with my command prompt? I know this is not specifically a question about Java, but I can't use Java without this.

thanks.

[1047 byte] By [sahilsgandhia] at [2007-10-2 9:11:41]
# 1

> Basically, it won't accept any strings as a parameter.

> ...

> I got around this by using the short names for files. For example, I

> used the name docume~1 instead of "documents and settings".

So it *is* accepting some strings.

Check that you are using cmd.exe not command.com. Ie, from

Start->Run... type

cmd

And not command.

Try the javac command and if the computer says

'javac' is not recognized as an internal or external command,

operable program or batch file.

then will have to set your OS path (not CLASSPATH - do not set

CLASSPATH at any time or the command prompt will likely never work

again).

Instructions for setting the OS path are [urlhttp://java.sun.com/j2se/1.5.0/install-windows.html]here[/url]. Scroll down to

point number 5

pbrockway2a at 2007-7-16 23:18:44 > top of Java-index,Java Essentials,New To Java...
# 2
if your logn file namse have spaces in them, you must quote themcd "program files"for example
dmbdmba at 2007-7-16 23:18:44 > top of Java-index,Java Essentials,New To Java...
# 3
Thanks pbrockway2. I was using command.com and I guess that was a big mistake. After I switched to cmd.exe everything worked fine. Thanks for your help.
sahilsgandhia at 2007-7-16 23:18:44 > top of Java-index,Java Essentials,New To Java...
# 4
You're welcome, glad to help.
pbrockway2a at 2007-7-16 23:18:44 > top of Java-index,Java Essentials,New To Java...