Today's TLA is MWS.
Microsoft Winblows Sucks
Why does Microsoft windows blows so much? Follow these procedures with any Windows Program (.exe) to replicate some ill-posed behavior. Why do I feel like I have to relearn how computers think. Most POSIX machines don't even have to think about primative thinking about a space char " ".
FAILURE
C:\>cmd /c C:\Program Files\Java\jre1.5.0_11\bin\java.exe
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
PASS
C:\>cmd /c "C:\Program Files\Java\jre1.5.0_11\bin\java.exe"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
....
FAILURE
C:\>cmd /c "C:\Program Files\Java\jre1.5.0_11\bin\java.exe" "C:\Documents and Settings\dev\TestProgram"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
PASS
C:\>cmd /c ""C:\Program Files\Java\jre1.5.0_11\bin\java.exe" "C:\Documents and Settings\dev\TestProgram""
Exception in thread "main" java.lang.NoClassDefFoundError: C:\Documents and Settings\dev\TestProgram
So what does this little experiment tell us about cmd.exe? It is really dumb you have to quotize everything in Microsoft world just for a simple " " (space)
IFF you have something called an executable with a full path
c:\a space\in my\someprogram.exe
and you have text file with a full path
c:\a space\in my\file.txt
then you have to escape both strings as part of a bigger string.
C:\> cmd.exe /c ""c:\a space\in my\someprogram.exe" "c:\a space\in my\file.txt""
This is lame. Do we have to think like this in any POSIX machine? I think not!!!!
Enjoy,
Jonathan
Microsoft Winblows Sucks
Why does Microsoft windows blows so much? Follow these procedures with any Windows Program (.exe) to replicate some ill-posed behavior. Why do I feel like I have to relearn how computers think. Most POSIX machines don't even have to think about primative thinking about a space char " ".
FAILURE
C:\>cmd /c C:\Program Files\Java\jre1.5.0_11\bin\java.exe
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
PASS
C:\>cmd /c "C:\Program Files\Java\jre1.5.0_11\bin\java.exe"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
....
FAILURE
C:\>cmd /c "C:\Program Files\Java\jre1.5.0_11\bin\java.exe" "C:\Documents and Settings\dev\TestProgram"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
PASS
C:\>cmd /c ""C:\Program Files\Java\jre1.5.0_11\bin\java.exe" "C:\Documents and Settings\dev\TestProgram""
Exception in thread "main" java.lang.NoClassDefFoundError: C:\Documents and Settings\dev\TestProgram
So what does this little experiment tell us about cmd.exe? It is really dumb you have to quotize everything in Microsoft world just for a simple " " (space)
IFF you have something called an executable with a full path
c:\a space\in my\someprogram.exe
and you have text file with a full path
c:\a space\in my\file.txt
then you have to escape both strings as part of a bigger string.
C:\> cmd.exe /c ""c:\a space\in my\someprogram.exe" "c:\a space\in my\file.txt""
This is lame. Do we have to think like this in any POSIX machine? I think not!!!!
Enjoy,
Jonathan