I don't think jlink will ever include the jdk development tools in a
custom runtime (using jlink on windows or mac without
--strip-native-commands only gives me java and keytool), but you can
include the whole jdk (less src.zip and the jmods directory) by using
--runtime-image <runtime dir> and pointing <runtime dir> to the JDK you
are running jpackage from (or you can take copy of that JDK, modify it
in any way you want, and point to that)).
/Andy
On 5/19/2021 10:00 AM, Michael Hall wrote:
I added
--jlink-options '--strip-debug --no-man-pages --no-header-files’
to my invocation, avoiding --strip-native-commands, so that the native java
commands are not stripped. I believe currently recommended jpackage way to do
this.
I get the following commands in my embedded JDK
java jdb jshell rmid serialver
javac jrunscript keytool rmiregistry
The installed jdk bin directory has 29 different commands including ones like
jpackage, jlink, javap, jcmd…
What if I want to run one of those from the application? I can exec them but
the version might not match the embedded?
Not a current problem that I know of, I will use the installed for now.