如何在Windows路径系统中添加Java bin文件夹路径 [英] How to add Java bin folder path in Windows path system

查看:363
本文介绍了如何在Windows路径系统中添加Java bin文件夹路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行为Windows制作的Java软件时遇到问题。
实际上我想在kali Linux上运行它,但每当我尝试运行软
时它会告诉我在Windows路径系统变量中添加Java bin文件夹路径。

i have a problem with running a Java software which is made for Windows. Actually I want run it on kali Linux but whenever I try to run the soft it tells me add Java bin folder path in Windows path system variable.

那就是我的Java版本

and thats my Java version

java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) Server VM (build 25.40-b25, mixed mode)

我该如何解决这个问题?

How can I solve this?

推荐答案

添加变量 - Java

首先,您需要找到环境变量

1。打开系统属性( WinKey +暂停),您应该看到以下屏幕。

1. Open up the system properties (WinKey + Pause) and you should see the below screen.

2。从系统属性中,选择高级链接。这应该会带你进入下面的屏幕。

2. From the system properties, tab select the "Advanced" link. This should take you to the below screen.

3. 从系统属性屏幕中选择高级选项卡。在此屏幕上,单击环境变量按钮。

3. From the System Properties screen select the "Advanced Tab". On this screen click the "Environment Variables" button.

4。您现在应该看到的类似于屏幕下方。

4. You should now be seeing something like the below screen.

现在你准备好添加变量 - JAVA

系统变量部分,点击新建按钮。

在此处输入变量名称: JAVA_HOME

In here enter the variable name : JAVA_HOME

输入变量值作为上一节中安装的java jdk的位置。 (假设您已经安装了Java SDK。如果您现在还没有时间这样做的话)

Enter the variable value as the location of the java jdk installed in the previous section. (This is assuming you already have installed Java SDK. If you haven't now is the time to do it)

以下我的位置示例。 (请注意,变量值将根据您的安装位置和jdk版本而有所不同)

For Example of my location below. (Please note the variable value will vary depending on your install location and version of the jdk)

单击确定完成此操作。完成后,您应该在系统变量列表中看到 JAVA_HOME 变量。

Click ok to complete this action. Once completed you should see the JAVA_HOME variable in the list of system variables.

接下来,您需要添加新创建的 JAVA_HOME 变量到您的路径。

Next, you need to add the newly created JAVA_HOME variable on to your path.

为此,请在系统变量列表中找到Path变量。选择它并单击编辑按钮。

To do this locate the "Path" variable in the system variables list. Select it and click the edit button.

这将显示以下选项。

滚动到变量值字段的末尾并附加到以下内容

Scroll to the end of the "variable value" field and append on the following

;%JAVA_HOME%\ bin

点击确定确认并离开编辑路径屏幕。

Click "OK" to confirm and leave the edit path screen.

完成后单击确定确认并离开环境变量屏幕。

Once complete click "OK" to confirm and leave the Environment variables screen.

接下来,打开 命令提示符(Winkey + R然后键入cmd)并运行java -version以验证它是否已正确安装。

Next, open a new command prompt (Winkey + R then type cmd) and run "java -version" to verify that it is correctly installed.

如果是,您应该会看到类似于以下屏幕截图的内容。

If it is you should see something similar to the below screenshot.

这篇关于如何在Windows路径系统中添加Java bin文件夹路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆