无论选择哪个版本,请记得安装后务必用 java -version 验证环境正确性。JDK 17 作为长期支持版本,提供了密封类(sealed classes)、模式匹配(pattern matching)等现代特性,是企业级开发和安全稳定的理想基础。
Once you have the .exe file (around 160 MB), follow these steps: jdk17windowsx64binexe link
: Contains the binaries (compiled, executable programs like java and javac ). jlink --module-path mymods --add-modules com
| 场景 | 推荐方案 | |---|---| | | Oracle JDK 17 .exe 图形化安装,安装过程最简单直观。 | | 企业批量化部署 | Oracle JDK 17 .msi + 静默安装命令,或选择 Microsoft OpenJDK 无缝对接 Azure/VS Code。 | | 对开源有严格要求的团队 | OpenLogic OpenJDK 或 Eclipse Adoptium 等开源构建版,免费且经过良好测试。 | | 绿色便携 / 多版本共存 | 直接下载 .zip 压缩包解压,通过脚本切换 JAVA_HOME 。 | jdk17windowsx64binexe link
After installation, your computer will not know where the java.exe and javac.exe programs are located. For Java to work from any directory in the Command Prompt, you must configure two environment variables: JAVA_HOME and PATH .
jlink --module-path mymods --add-modules com.myapp --output myimage