简体   繁体   English

无法编译Java程序命令行

[英]Cannot compile a Java program command-line

I tried the following in cl: 我在cl中尝试了以下内容:

javac Main.java

The shell gives an error that "javac" is not a recognized command. Shell给出一个错误,指出“ javac”不是可识别的命令。 I know for a fact I have the Java Platform installed. 我知道我已经安装了Java平台。 What could be wrong? 有什么事吗

(I use "cd" to set the directory first) (我先使用“ cd”设置目录)

javac很可能不在PATH上,因此您必须在命令中提供完整路径。

Add /bin folder to your environment variables. /bin文件夹添加到您的环境变量中。

How do I set or change the PATH system variable? 如何设置或更改PATH系统变量?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM