NSIS - Failure to run Java application with 64-bit Java

My installer runs the batch file in -post. Up to 32 bits this works fine, but when I have the 64-bit JVM installed, I get this error:

"java" is not recognized as an internal or external command, operating program, or batch file.

I assume that since NSIS is 32 bits, it does not see a 64-bit environment. If I run the batch file from the command line, it works fine.

How can I get environment vars for 64-bit Java and use them in my batch file?

+4
source share
2 answers

I assume that this works under the 64-bit taste of windows.

64-bit Windows does smart things for backward compatibility with 32-bit. Registry entries and file search paths are automatically redirected.

The command line you are using will have a 64-bit command line.

To run the 32-bit command line, run% windir% \ SysWoW64 \ cmd.exe. You should be able to reproduce the failure state. 32-bit NSIS will run the batch file in 32-bit mode.

You need to determine how the java.exe file is under 64 bits. If you publish your batch file here, there must be something fairly obvious that is being distracted.

+4
source

I had the same problem as you! I followed this guy's advice.

http://forum.ragezone.com/f428/add-fixing-java-recognized-internal-527269/

Basically, if I had to summarize, look at the two program files. IT should be located somewhere in the folder C: \ Program Files (x86) \ Java \ jdk1.6.0_10 \ bin. But I will follow the directions in this link!

+1
source

All Articles