打开cmd窗口,cd到jdk目录 ,执行下列命令即可,jdk目录下会 生成jre目录。 bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre