fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.02k stars 131 forks source link

Erro “require java runtime environment......” in 1.7.6-SNAPSHOT #412

Open Nonoas opened 3 months ago

Nonoas commented 3 months ago

Discussed in https://github.com/fvarrui/JavaPackager/discussions/411

Originally posted by **Nonoas** May 25, 2024 I get the error too: ![image](https://github.com/fvarrui/JavaPackager/assets/54799528/a0a7cb37-1ba3-4007-b038-36165a52624d) plugin: io.github.fvarrui:javapackager:1.7.6-SNAPSHOT config: ``` grovvy tasks.register('packageMyApp', PackageTask) { dependsOn clean, jar // mandatory mainClass = mainClassName // optional modules = ["java.base", "java.management", "java.net.http", "java.scripting", "java.sql", "java.naming", "jdk.jsobject", "jdk.unsupported", "jdk.unsupported.desktop", "jdk.xml.dom"] bundleJre = true generateInstaller = false administratorRequired = false winConfig { createZipball = true } } ``` ``` java version "17" 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing) ``` But, it works when i using `.\jre\bin\java -jar worktools.exe` to run it. so i think maybe the jre is no problem, and i don1t know have to fix
fvarrui commented 2 months ago

Hi @Nonoas! I'll try to reproduce your issue and tell you something asap

fvarrui commented 2 months ago

I'm not able to reproduce your issue. I've just build an app with and without a JRE using Gradle and all seems to be working fine. I need more details or maybe a sample app.

Nonoas commented 1 week ago

I'm not able to reproduce your issue. I've just build an app with and without a JRE using Gradle and all seems to be working fine. I need more details or maybe a sample app.

just now, i reproduce this issue with javapackager1.7.6 release, there is the project reproduced:https://github.com/Nonoas/work-tools/tree/error_with_jp1.7.6

Nonoas commented 1 week ago

I'm not able to reproduce your issue. I've just build an app with and without a JRE using Gradle and all seems to be working fine. I need more details or maybe a sample app.

just now, i reproduce this issue with javapackager1.7.6 release, there is the project reproduced:https://github.com/Nonoas/work-tools/tree/error_with_jp1.7.6

runtime info :

C:\Users\13569\Desktop>echo %JAVA_HOME%
D:\RUNTIME\Local\Java\jdk17

C:\Users\13569\Desktop>java -version
java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)