问题
Why is Java JPackage installing Windows dll files in two places ?
My Jlink cmd is:
"C:\Program Files\AdoptOpenJDK\jdk-14.0.0.36-hotspot\bin\jlink" --module-path="C:\Program Files\AdoptOpenJDK\jdk-14.0.0.36-hotspot\jmods" --add-modules java.desktop,java.datatransfer,java.logging,java.management,java.naming,java.net.http,java.prefs,java.scripting,java.sql,jdk.management,jdk.unsupported,jdk.scripting.nashorn,jdk.jcmd --output C:\code\jthink\jaikoz\windowsjre\JVM64
and my build command is
"C:\Program Files\AdoptOpenJDK\jdk-14.0.0.36-hotspot\bin\jpackage" -i C:\Code\jthink\jaikoz\target\Jaikoz\activebuild\buildWindows\lib --runtime-image C:\code\jthink\jaikoz\windowsjre\JVM64 --main-class com.jthink.Jaikoz --name Jaikoz --win-dir-chooser --main-jar jaikoz.jar --app-version 10.2.0 --install-dir Jthink2\Jaikoz --copyright "Copyright Info" --arguments "-l2 -m2 -f" --vendor JThink
They are installed directly in the installation folder, and in the runtime/bin folder, is it meant to do this ?
回答1:
Looks like a bug in jpackage which is reported here but not marked with a fix version JDK-8236744, and several duplicates one of which says fix version 15: JDK-8230863
All DLLs except applauncher.dll could be deleted from the root of install directory, but they will keep returning for time being...
来源:https://stackoverflow.com/questions/62607300/why-is-java-jpackage-installing-windows-dll-files-in-two-places