JAVA_HOME on my dev machine - which is Windows 7 Pro 64 Bit - points to a 64-bit Java, and that's fine in general. However, I just installed a program - to wit, the FlashDeveloper IDE - for which this setting is not fine: a 32-bit Java is required instead, and the
JAVA_HOME setting prevents the 32-bit Java from being picked up.
So I'd like to unset
JAVA_HOME just before launching the Flash IDE.
One way to achieve this would be via a batch script.
But isn't there a better way? I searched the various tabs of the Windows Shortcut properties window for such an option but there doesn't seem to be any. (I did discover, however, a checkbox for running the program through the shortcut as
Administrator.) Any suggestions?
Update: Solution that worked for me
:: type "C:\Program Files (x86)\FlashDevelop\FlashDevelop.bat" @ECHO OFF SETLOCAL REM Prevent wrong 64-bit JVM from being picked up: SET JAVA_HOME= CALL "%~dpn0.exe"
That will open up a command prompt which I can then just close. You can make the shortcut have the icon of the executable you're calling from the command prompt by instructing the shell via the shortcut properties to go looking for an icon inside the actual executable.
I couldn't get the solutions involving
START to work, which opens up a new
cmd.exe window on my machine when passed the following (no idea why):
start "C:\Program Files (x86)\FlashDevelop\FlashDevelop.exe"
Must say that my
cmd.exe is tuned - that might have an influence here and there.