Monthly Archives October 2007

Gnnhh.

I get that you want to protect your business from burglars. I get that. I really do.
But if you allow your alarm to wail unattended for OVER AN HOUR when people are trying to sleep, then you should be shot.

Insomnia!

Bane of restfulness!
Slayer of sleepytime!
Truly, thou art a cruel and capricious mistress.

Runtime.exec() slight weirdness

Change working directory of java code to location of batch file before code is launched, call rt.exec(”batchfile.bat”), batch file runs.
Leave working directory alone, call

File dir = new File(”C:\\path\\to\\batch\\file”);
rt.exec(”batchfile.bat”, null, dir);

Batch file does not run, giving a file not found error.
Change second line to rt.exec(”cmd /c batchfile.bat”, null, dir); - batch file runs.
I’m not sure why [...]