2

I build an EXE from my Maven project with Launch4j, which is written with jdk1.8.0_172 64-bit. But when I tried to launch the EXE file from CMD or Git bash, it says

This application requires a Java Runtime Environment 1.8.0 (32-bit)

Do you have any idea why it happens and what I should do to resolve this problem?

Little Helper
  • 1,870
  • 3
  • 12
  • 20
Shush
  • 77
  • 1
  • 16
  • Do you have a 32-bit JRE installed? – SLaks Jul 17 '18 at 22:18
  • @SLaks did you read the question? OP wants this to run with 64 bit JRE, so he does not have 32 bit one. – GotoFinal Jul 17 '18 at 22:20
  • 1
    Try checking similar post https://stackoverflow.com/questions/2688932/configure-launch4j-to-use-32-bit-jvm-only. you might be able to check the configurations pointed in the answer – Priya Jain Jul 17 '18 at 22:25
  • @PriyaJain Yes thanks for the advice. Effectively I put 32 bit by error in pom the value of instead of 64. Very stupid mistake. – Shush Jul 19 '18 at 07:54

1 Answers1

0

Make sure to check the value of this property in pom:

 <plugin>
      <artifactId>launch4j-maven-plugin</artifactId>
      <executions>
          <execution>
              <configuration>
                   <jre>
                       <bundledJre64Bit>true</bundledJre64Bit>
                       <runtimeBits>64</runtimeBits>
                   </jre>
              </configuration>
          </execution>
      </executions>
 </plugin>
Shush
  • 77
  • 1
  • 16