javac无法运行,而且似乎没有安装 [英] javac cannot be run, and furthermore does not seem installed
问题描述
我在设置 Java 时遇到问题.
I have a problem involving setting up Java.
我已经安装了 JRE,将其路径添加到 PATH
,并设置了 JAVA_HOME
和 CLASSPATH
.现在,java
和 javacpl
工作正常,但运行 javac
会生成 command-not-found 错误.此外,javac.exe
甚至似乎不存在于 JRE 的 bin
文件夹中.
I have installed the JRE, added its path to PATH
, and set JAVA_HOME
and CLASSPATH
. Now, java
and javacpl
work fine, but running javac
generates a command-not-found error. Furthermore, javac.exe
does not even seem to exist in the JRE's bin
folder.
我如何运行 javac
?
推荐答案
JRE 只是 Java 运行时环境,其中仅包含运行已编译的 Java 程序所需的基础结构.
The JRE is merely the Java Runtime Environment, which includes only the infrastructure needed to run Java programs that are already compiled.
要使用 javac
编译 Java 源代码,您需要 Java 开发工具包 (JDK).
To compile Java source code using javac
, you need the Java Development Kit (JDK).
在 Oracle 的 Java 下载页面上,选择标记为JDK".
On Oracle's Java download page, choose the package labelled "JDK".
这篇关于javac无法运行,而且似乎没有安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!