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。

目录
相关文章
|
6天前
|
Oracle Java 关系型数据库
Linux下JDK环境的配置及 bash: /usr/local/java/bin/java: cannot execute binary file: exec format error问题的解决
如果遇到"exec format error"问题,文章建议先检查Linux操作系统是32位还是64位,并确保安装了与系统匹配的JDK版本。如果系统是64位的,但出现了错误,可能是因为下载了错误的JDK版本。文章提供了一个链接,指向Oracle官网上的JDK 17 Linux版本下载页面,并附有截图说明。
Linux下JDK环境的配置及 bash: /usr/local/java/bin/java: cannot execute binary file: exec format error问题的解决
|
1月前
|
Oracle Java iOS开发
JDK的选型、安装与配置
JDK的选型、安装与配置
|
1月前
|
Oracle Java iOS开发
JDK的选型、安装与配置
JDK的选型、安装与配置
|
2月前
|
Java 应用服务中间件 开发工具
[App Service for Windows]通过 KUDU 查看 Tomcat 配置信息
[App Service for Windows]通过 KUDU 查看 Tomcat 配置信息
|
2月前
|
Java 应用服务中间件 Windows
【App Service for Windows】为 App Service 配置自定义 Tomcat 环境
【App Service for Windows】为 App Service 配置自定义 Tomcat 环境
|
2月前
|
安全 机器人 程序员
Windows 计划任务每天隔 3 小时运行一次批处理文件详细配置步骤
Windows 计划任务每天隔 3 小时运行一次批处理文件详细配置步骤
181 2
|
2月前
|
开发者 C# UED
WPF多窗口应用程序开发秘籍:掌握窗口创建、通信与管理技巧,轻松实现高效多窗口协作!
【8月更文挑战第31天】在WPF应用开发中,多窗口设计能显著提升用户体验与工作效率。本文详述了创建新窗口的多种方法,包括直接实例化`Window`类、利用`Application.Current.MainWindow`及自定义方法。针对窗口间通信,介绍了`Messenger`类、`DataContext`共享及`Application`类的应用。此外,还探讨了布局控件与窗口管理技术,如`StackPanel`与`DockPanel`的使用,并提供了示例代码展示如何结合`Messenger`类实现窗口间的消息传递。总结了多窗口应用的设计要点,为开发者提供了实用指南。
96 0
|
2月前
|
网络安全 Windows
在Windows电脑上启动并配置SSH服务
在Windows电脑上启动并配置SSH服务
57 0
|
2月前
|
Ubuntu Linux 数据安全/隐私保护
在 Windows 中配置 WSL2 与 Debian 的全流程
【8月更文挑战第27天】本文详细介绍了在Windows环境中配置WSL2与Debian的全过程,包括确认Windows版本、启用相关功能、安装WSL并设置版本为WSL2、下载安装Debian、配置国内镜像源,以及设置Xserver实现GUI功能。通过这些步骤,用户能够顺利完成配置,并进行基本优化。
124 0
|
2月前
|
Java 开发者
Jenv多版本JDK管理大揭秘:动态切换、轻松配置,一文让你彻底解锁!
【8月更文挑战第25天】Jenv是一款强大的Java版本管理工具,它使开发者能够在不同的项目中灵活使用多个JDK版本。通过环境变量管理和命令行操作实现版本切换。安装简便,配置快捷。只需几条命令即可添加、查看及切换JDK版本。示例展示了如何在项目中运用不同JDK版本编译与运行程序,极大提升了开发效率和灵活性。
114 0
下一篇
无影云桌面