<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d5160689\x26blogName\x3dThree+Letter+Acronyms+(TLA)\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://tla.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://tla.blogspot.com/\x26vt\x3d-8755022925038927658', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Three Letter Acronyms (TLA)

Thursday, August 30, 2007

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

0 Comments:

Post a Comment

<< Home