Open touhidurrr opened 2 years ago
I can't tell what you're running. You can check that directory to make sure it has a 'jvm.dll' file in there with the proper directory structure.
I can't tell what you're running. You can check that directory to make sure it has a 'jvm.dll' file in there with the proper directory structure.
In short it was working fine with some Java 8 oldjdks. However when I tried to use latest Temurin 11 JDK or JRE zips for windows x64 or x86_64, it failed. The only thing the changed for packr was the link in this line:
https://github.com/touhidurrr/buildUnciv/blob/9bf7ec0416c399aa9056bc70798b5a52b269cd66/.github/workflows/buildAndRelease.yml#L49
i don't think packr would throw java.io.IOException: Couldn't find JRE in JDK
for anything esle.
I haven’t tried the latest adoptium jdks. You could try forking and updating the test to see what happens.
@karlsabo from my tests:
admin@touhidurrr:~ $ find /usr/lib/jvm/temurin-11-jdk-armhf | grep -P 'jvm.dll|libjvm.so|libjvm.dylib'
/usr/lib/jvm/temurin-11-jdk-armhf/lib/client/libjvm.so
/usr/lib/jvm/temurin-11-jdk-armhf/lib/server/libjvm.so
admin@touhidurrr:~ $ find /usr/lib/jvm/java-11-openjdk-armhf | grep -P 'jvm.dll|libjvm.so|libjvm.dylib'
/usr/lib/jvm/java-11-openjdk-armhf/lib/server/libjvm.so
As you can see the lib or bin directory holding these files is clearly separted in client and server folders. However, don't think Packr currently checks for it. https://github.com/libgdx/packr/blob/e6a277d86f1e7e28ad356dac65f0f90e206bd4ba/Packr/src/main/java/com/badlogicgames/packr/Packr.java#L488-L498 I think fixing this would fix the issue.
Ignore https://github.com/libgdx/packr/issues/220#issuecomment-1127826862, I forgot this was a Windows specific issue. Also my analysis isn't correct.
For Temurin:
~$ find . | grep -P 'jvm.dll|libjvm.so|libjvm.dylib'
./bin/client/jvm.dll
./bin/server/jvm.dll
for OldJDK
$ find . | grep -P 'jvm.dll|libjvm.so|libjvm.dylib'
./jre/bin/server/jvm.dll
does it doesn't work because for Temurin it is the folder root?
ok @karlsabo I have built the packr from libgdx/packr:master@e6a277d which is the current latest on: https://github.com/touhidurrr/packr/releases/tag/1653143085084336432
And tested it with Temurin Releases.
The result? Failure. CI Tests
I updated the test suite to use the latest Temurin JDKs and JREs and they work without issue.
Take a look at the list of JDKs and JREs that are used in testing: https://github.com/libgdx/packr/blob/6d1d5b6eefd3f6b0381ec980c1eb77440b425170/TestAppJreDist/testAppJreDist.gradle.kts
I tried with JRE and JDK Temurin 11 builds for Windows x64 and x86_64 from here: https://adoptium.net/temurin/releases/
Packr cannot recogise either JDK or JRE and throws the following error:
Example Tests: https://github.com/touhidurrr/buildUnciv/runs/6430297670?check_suite_focus=true#step:6:170