Sublime Text问题(javac: 无效的标志:)

huangapple 未分类评论60阅读模式
英文:

Sublime text problem (javac: invalid flag:)

问题

我已经安装了Sublime Text 3用于编写Java代码。我按照一个视频的步骤来操作。我按照视频中展示的所有步骤进行了操作,但是当我尝试编译时出现了问题。

我这里有JDK:

Sublime Text问题(javac: 无效的标志:)

我在这里添加了jdk 1.8.0:

Sublime Text问题(javac: 无效的标志:)

我不知道我做错了什么... 请帮忙 Sublime Text问题(javac: 无效的标志:)

英文:

I have installed Sublime Text 3 to code in Java. I have followed a video to do it. I did all the steps as shown on the video but when i try to compile it does not work.

Sublime Text问题(javac: 无效的标志:)

I have the jdk here:

Sublime Text问题(javac: 无效的标志:)

and I added the jdk 1.8.0 here:

Sublime Text问题(javac: 无效的标志:)

I don't know what have I done wrong... pls help Sublime Text问题(javac: 无效的标志:)

答案1

得分: 0

java路径已正确配置,因为它找到了编译器javac
错误信息表示javac未被正确调用。
基本的编译和运行步骤如下:
(与MainClass - HelloMundo位于相同级别)
javac HelloMundo.java(1_编译),然后
java HelloMundo(2_运行)###如果直接从控制台运行,将会执行此步骤
此外,请使用class name首先保存文件,对于您的情况是HelloMundo.java
也许最好还要搜索进一步的文档,甚至了解如何正确添加图片。祝好运!

英文:

java path is properly configured since it's found the compiler javac.
<br>Error said that javac it's not properly invoked.
<br>Basic compilation and run steps are:
<br>( on the same level as MainClass - HelloMundo)
<br>javac HelloMundo.java (1_compile) and after
<br>java HelloMundo (2_run) ### this will run if try directly from console
<br>
<br>Also, save the file first with class name, in your case HelloMundo.java
<br>Maybe it's better to search also for further documentation and even take a look of how to add properly the pictures. Good Luck !

huangapple
  • 本文由 发表于 2020年4月6日 02:00:25
  • 转载请务必保留本文链接:https://java.coder-hub.com/61047064.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定