| Author |
javac -classpath "white spaces"
|
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
I have noticed that if I try and use the -classpath option when compiling or running a java application, and if my classpath is something like "c:\Document and Settings\gdboling\My Program..." I get an error because of the white spaces in the directory names. Is there a work around for this? [ June 06, 2002: Message edited by: Gregg Bolinger ]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
|
|
Is the command line itself failing, or is the command starting and then barfing on the classpath? If it's the CLI that's tripping over the space you could try wrapping the parameter in quotes (") which should prevent it from trying to break the parameter at the space. Or, you could always resort to the crappy PROGRA~1 notation for the folders that contain spaces. hth, bear
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
On my Windows ZP system, I experience the same problem which is resolved by enclosing the classpath setting in double quotes. Note that when amending an already established classpath, everything must be surrounded with the double quotes. This is what I'm trying to say: javac -classpath "%classpath%;SomeAdditionalPaths" Whatever.java Any luck?
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
|
Thanks Dirk, i will try that. I think that will work though. It makes sense.
|
 |
 |
|
|
subject: javac -classpath "white spaces"
|
|
|