On 2/10/2017 11:21 AM, Jim Connors wrote:

Can you re-create the JAR file for scoreboard with JDK 9's jar tool as a workaround for now? The reason you don't see the issue with com.jtconnors.socket is that it doesn't have any concealed packages and that is where jlink is tripping up.

-Alan

Jim Clarke, cc:ed on these emails just did exactly that and didn't have any success with his attempt. I will also try the same thing.

-- Jim C


OK, here's the moral of the story:  Use the jdk9 jar utility.  This works:

   C:\tmp\scratch>jar --create --file scoreboard.jar --main-class
   scoreboard.fx2.Main --module-version 1.0 -C scoreboard .

   C:\tmp\scratch>jlink --module-path .;\Users\jtconnor\jdk-9\jmods
   --add-modules scoreboard --output reducedImage --compress=2
   --strip-debug

One interesting thing though.  jdeps on the scoreboard.jar file yields this:

   C:\tmp\scratch>jdeps -s --module-path . scoreboard.jar
   scoreboard -> com.jtconnors.socket
   scoreboard -> java.base
   scoreboard -> java.logging
   scoreboard -> java.xml
   scoreboard -> javafx.base
   scoreboard -> javafx.controls
   scoreboard -> javafx.graphics
   scoreboard -> javafx.media

Whereas the jlink image includes additional modules:

     C:\tmp\scratch>reducedImage\bin\java.exe --list-modules
     com.jtconnors.socket
     java.base@9-ea
->  java.datatransfer@9-ea
->  java.desktop@9-ea
     java.logging@9-ea
->  java.prefs@9-ea
     java.xml@9-ea
     javafx.base@9-ea
     javafx.controls@9-ea
     javafx.graphics@9-ea
     javafx.media@9-ea
->  jdk.jsobject@9-ea
     [email protected]





Reply via email to