0

I'm trying to make my .jar file with the javafx stuff into an executable application, but when I try to do jpackage on the command line, I'm getting command not found. I've downloaded the latest jdk-15.0.1_osx-x64_bin.dmg from Oracle.

4

1 回答 1

3

Although some Java commands are defined (eg java, javac) And are in the local /usr/bin directory, they only contain commands that were in the Java 6 release (including eg appletviewer).

Newer commands that were added in later Java releases like jmod, jlink etc aren’t available in the path. I’ve raised a radar (bug) at Apple a few years ago And the response was “so?” — don’t hold your breath.

To run these commands you will need to add the Home/bin directory of your install (under /Library/Java/JavaVirtual/Machines) to your PATH environment variable. You can also use /usr/libexec/java_home to find the path of the installed JVM automatically.

于 2021-02-06T23:55:12.137 回答