RFR: JDK-8258755: jpackage: Invalid 32-bit exe when building app-image
asemenyuk at openjdk.java.net
Wed Jan 13 16:51:19 UTC 2021
On Wed, 13 Jan 2021 01:32:51 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> JDK-8258755: jpackage: Invalid 32-bit exe when building app-image
> src/jdk.jpackage/share/classes/jdk/jpackage/internal/Platform.java line 127:
>> 125: return is64b;
>> 126: }
> This is Windows specific thing. There is no point to keep it in shared code. I'd suggest to move this function in WixSourcesBuilder class.
> I think it is not correct to check for arch of the OS where jpackage runs. Jpackage from 32bit JDK (if somebody would build 32bit OpenJDK) would bake in 32bit Java runtime in app image regardless Windows is 64bit or 32bit. So the arch of installer is determined by arch of Java runtime baked in the app image. For simplicity we can assume that arch of Java runtime is the same as the arch of jpackage (this might not be the case for external Java runtime case though, but let's leave this possibility aside as it is not supported anyways). If so, checking of `sun.arch.data.model` system property would be better alternative to `os.arch`.
Sorry, I left this comment earlier, but it was lost.
More information about the core-libs-dev