I noticed the following strange behavior:
Fresh windows 7 64 bit install.
This creates the file "c:\window\system32\java.exe"
running cmd.exe I can now run
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
However, if I attempt to run this java.exe from within any other 32-bit app (ex: ruby, console2, python), it doesn't run. In fact, if I run console2 (which spawns and wraps cmd.exe), it can't actually even see the file c:\windows\system32\java.exe -- it's like it doesn't even exist. Adding the full path to java.exe (c:\program files\java\jre6\bin or what not) results in it now working well and being spawnable from within 32 bit apps. This smells like a bug.
Been there too =(
I'd suggest you install jdk-6u24-windows-i586.exe if you need 32-bit support.
Looks like you're being "victim" of Microsoft's WOW64, see http://msdn.microsoft.com/en-us/library/aa384249 for the details.