Originally posted by eric elysia:
OK, I tried what you suggested.
I tried:
javac -classpath C:\Documents and Settings\Owner\Desktop\javahw
I got an invalid flag error. My guess is because of the "space" after Documents.
[ January 28, 2006: Message edited by: eric elysia ]
That is correct. In order to use spaces other special characters in command line arguments like this, you must put quotes around everything you want to treat as a single
string. For example:
javac -classpath "C:\Documents and Settings\Owner\Desktop\javahw" MyClass.java
This is one reason why I like my alternative suggestion. If it was unclear, in this case you would use the following commands:
cd "C:\Documents and Settings\Owner\Desktop\javahw"
javac packagename\ClassName.java
This assumes that either the CLASSPATH is not set or that it contains the current directory . (dot).
Layne
[ January 28, 2006: Message edited by: Layne Lund ]