Eclipse 中的 javac ?
eclipse新手,我有一个幼稚的问题。
我在 Eclipse 中找不到执行等效命令行“javac”的地方。如果我理解得很好的话,从 Eclipse 进程的菜单中“运行”为 javac + java。所以我的问题是:在Eclipse下,我们如何仅使用“javac”编译.java?谢谢。
有关信息,我注意到这个类似的帖子 如何从 Eclipse 运行 Javac 没有回答我的问题。我的方法是“编译 .java 文件而不运行任何东西”
Newbie on eclipse, I have a naive questions.
I have found nowhere in Eclipse to execute the equivalent command line "javac". If I understand well, "run" from the menu of Eclipse processes as javac + java. So my question is: Under Eclipse, how can we compile a .java with "javac" only ? Thanks.
For information, I notice this similar post
How to run Javac from Eclipse
does not answer my question. Mine is to "compile a .java file without running anything"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,您可以让 Eclipse 为您运行 Ant...但通常您只需让 Eclipse 使用其内置编译器为您编译代码即可。不需要javac。
默认情况下,Eclipse 将在您每次保存时进行构建 - 您根本不需要显式构建。当您在 Eclipse 中使用“运行”时,它不需要在那个点进行编译,因为代码已经构建了。
如果您想查找类文件,只需在输出目录下查找即可。
Well, you can make Eclipse run Ant for you... but normally you just get Eclipse to compile the code for you with its built-in compiler. There's no need for javac.
By default, Eclipse will build every time you save - you don't need to explicitly build at all. When you use "Run" in Eclipse, it doesn't need to compile at that point, because the code has already built.
If you want to find the class files, just look under your output directory.
Eclipse 应该自动构建您的项目,因此您无需调用 javac
Eclipse should build your projects automatically so you don't need to call javac