| |
@@ -0,0 +1,39 @@
|
| |
+ # HG changeset patch
|
| |
+ # User sgehwolf
|
| |
+ # Date 1546506134 -3600
|
| |
+ # Thu Jan 03 10:02:14 2019 +0100
|
| |
+ # Node ID 606f63c205695d16502de6b8ba4c1b4f5ec39bf9
|
| |
+ # Parent bda6414e933c9274f59184ece7c4b15283d70dac
|
| |
+ Add warning about distribution specific build.
|
| |
+ Reviewed-by: jvanek
|
| |
+
|
| |
+ diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java
|
| |
+ --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java
|
| |
+ +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java
|
| |
+ @@ -256,6 +256,10 @@
|
| |
+ // no --module-path specified - try to set $JAVA_HOME/jmods if that exists
|
| |
+ Path jmods = getDefaultModulePath();
|
| |
+ if (jmods != null) {
|
| |
+ + // When no module path is being specified at the command line
|
| |
+ + // we know for distribution builds that jlink-created images
|
| |
+ + // will also be distro specific.
|
| |
+ + System.err.println(taskHelper.getMessage("warn.image.distro.specific"));
|
| |
+ options.modulePath.add(jmods);
|
| |
+ }
|
| |
+
|
| |
+ diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties
|
| |
+ --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties
|
| |
+ +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties
|
| |
+ @@ -144,6 +144,12 @@
|
| |
+ warn.invalid.arg=invalid classname or pathname not exist: {0}
|
| |
+ warn.split.package=package {0} defined in {1} {2}
|
| |
+ warn.provider.notfound=No provider found for service specified to --suggest-providers: {0}
|
| |
+ +warn.image.distro.specific=WARNING: This JDK image is dynamically linked. This means the JDK you are using as \
|
| |
+ +basis for a custom image is very likely distribution specific. Therefore, the resulting image will most likely run \
|
| |
+ +only on this distribution too. In order to avoid this issue, \
|
| |
+ +please download a staticly linked JDK, and use that for the module path. \
|
| |
+ +In addition, there can be issues with the size of native libraries and executables. \
|
| |
+ +If your image seems excessive in size, consider using option ''--native-libs-replace''.
|
| |
+ no.suggested.providers=--bind-services option is specified. No additional providers suggested.
|
| |
+ suggested.providers.header=Suggested providers
|
| |
+ providers.header=Providers
|
| |
When no module path is being specified on the command line,
the default module path is being used which is ${java.home}/jmods.
This implies that distribution specific libraries are being
transferred to the custom image, which, in turn, will be
distribution specific too. Warn about this in jlink.
See RHBZ#1659192