运行EXE

时间:2018-07-17 22:17:35

标签: java exe 32bit-64bit launch4j

我使用Launch4j从我的Maven项目中构建了一个EXE,该文件是用jdk1.8.0_172 64-bit编写的。 但是,当我尝试从CMD或Git bash启动EXE文件时,它说

  

此应用程序需要Java Runtime Environment 1.8.0(32位)

您是否知道为什么会发生以及我应该怎么做才能解决此问题?

1 个答案:

答案 0 :(得分:0)

确保在pom中检查此属性的值:

 <plugin>
      <artifactId>launch4j-maven-plugin</artifactId>
      <executions>
          <execution>
              <configuration>
                   <jre>
                       <bundledJre64Bit>true</bundledJre64Bit>
                       <runtimeBits>64</runtimeBits>
                   </jre>
              </configuration>
          </execution>
      </executions>
 </plugin>