windows下JDK的环境变量配置

简介: 到官网下载JDK的对应windows版本, 安装, 然后进行环境变量配置, 然后打开cmd.exe运行。 Updating the PATH Environment Variable

到官网下载JDK的对应windows版本。(Make sure you download the JDK, not the JRE.)
https://www.oracle.com/technetwork/java/javase/downloads/index.html
安装,进行环境变量配置。
Updating the PATH Environment Variable
If you do not set the PATH variable, you need to specify the full path to the executable file every time you run it, such as:

C:> "C:Program FilesJavajdk1.8.0binjavac" MyClass.java
It is useful to set the PATH variable permanently so it will persist after rebooting.

To set the PATH variable permanently, add the full path of the jdk1.8.0bin directory to the PATH variable. Typically, this full path looks something like C:Program FilesJavajdk1.8.0bin. Set the PATH variable as follows on Microsoft Windows:

Click Start, then Control Panel, then System.

Click Advanced, then Environment Variables.

Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. The following is a typical value for the PATH variable:

C:WINDOWSsystem32;C:WINDOWS;C:Program FilesJavajdk1.8.0bin
Note:

The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. Microsoft Windows looks for programs in the PATH directories in order, from left to right.

You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window you open after setting the PATH variable.

打开cmd.exe运行javac查看是否已经配置OK。

目录
相关文章
|
Windows
Windows无法连接到打印机,请检查打印机名并重试 - 配置Windows 共享打印机出错;
WIN7共享打印机无法被WIN11连接,出现错误代码0x0000011b或0x00000709,可能是系统版本不兼容所致。本文提供多个轻量级修复工具,无需安装,双击即用,专为解决此类小问题设计,操作简单,适合普通用户快速修复打印机连接异常。
1565 0
|
网络安全 Windows
Windows IIS 10如何配置自签名SSL并实现自动跳转
本文记录了IIS配置自签名证书及HTTPS跳转的注意事项。包括解决443端口占用问题、URL Rewrite插件安装与配置、web.config修改方法,以及避免因旧教程导致的配置错误。
Windows IIS 10如何配置自签名SSL并实现自动跳转
|
C语言 图形学 Windows
Windows下安装和配置GTK4(基于CLion)
本文介绍了作者选择GTK作为C语言图形库的原因,包括代码简洁、控件丰富和界面美观,并分享了在Windows环境下通过MSYS2安装GTK4及在CLion中配置开发环境的详细步骤。
1481 0
|
安全 Windows
“由于启动计算机时出现了页面文件配置问题,Windows在你的计算机上创建了一个临时页面文件。。。”的问题解决
本文主要介绍了因清理电脑垃圾文件时误删虚拟内存导致的Windows页面文件配置问题,并提供了详细的解决步骤。问题表现为开机后出现临时页面文件创建的提示弹窗。解决方法包括通过控制面板或快捷键进入高级系统设置,进而调整虚拟内存设置:进入性能选项中的虚拟内存栏,选择自动管理所有驱动器的分页文件大小,最后确认并重启计算机以恢复正常运行。
10794 5
“由于启动计算机时出现了页面文件配置问题,Windows在你的计算机上创建了一个临时页面文件。。。”的问题解决
|
Windows
Windows下版本控制器(SVN)-验证是否安装成功+配置版本库+启动服务器端程序
Windows下版本控制器(SVN)-验证是否安装成功+配置版本库+启动服务器端程序
441 2
|
关系型数据库 MySQL Java
安装和配置JDK、Tomcat、MySQL环境,以及如何在Linux下更改后端端口。
遵循这些步骤,你可以顺利完成JDK、Tomcat、MySQL环境的安装和配置,并在Linux下更改后端端口。祝你顺利!
940 11
|
Java 关系型数据库 MySQL
JDK、Tomcat、MariaDB数据库和Profile多环境的配置与使用
以上就是JDK、Tomcat、MariaDB数据库和Profile多环境的配置与使用的基本步骤。这些步骤可能会因为你的具体需求和环境而有所不同,但是基本的思路是一样的。希望这些信息能够帮助你更好地理解和使用这些工具。
550 17
|
Java Linux 应用服务中间件
在Rocky Linux 9上安装JDK并配置环境变量!
本教程介绍在Rocky Linux 9上安装JDK并配置环境变量的完整步骤。首先更新系统,清理旧版本JDK相关包及残留文件,确保环境干净。接着搜索并安装所需版本的JDK(如OpenJDK 17),验证安装是否成功。然后查找JDK安装路径,配置全局环境变量`JAVA_HOME`和`PATH`,最后验证环境变量设置。按照此流程操作,可顺利完成Java开发环境搭建,支持多版本切换(如JDK 8/11/17)。生产环境请谨慎操作,避免影响现有服务。
2408 21
|
Windows
Windows下版本控制器(SVN)- 配置版本库
Windows下版本控制器(SVN)- 配置版本库
287 0
|
安全 Shell 开发工具
Windows下使用git配置gitee远程仓库
就在前几天因为一些原因,我的电脑重装了系统,然后再重新配置git的环境的时候就遇到了一些小问题。所以我决定自己写一篇文章,以便以后再配置git时,避免一些错误操作,而导致全网搜方法,找对的文章去找对应的解决方法。下面为了演示方便就拿gitee来演示,不拿GitHub了写文章了。
819 0