将编译器与编辑器关联

发布于 2024-08-04 02:27:03 字数 89 浏览 3 评论 0原文

典型的 java 编辑器是如何工作的?他们如何将 javac 和 java 与编辑器关联起来,以便一旦您说编译并运行,它会将文件定向到编译器,并将输出提取到编辑器?

How does typical editors for java work? How do they associate javac and java to the editor so that once you say compile and run, it directs the file to the compiler, and extracts the output to the editor?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

横笛休吹塞上声 2024-08-11 02:27:03

这完全取决于编辑器 - 但“高级”IDE 通常至少有一个内置的解析器,以提供语法突出显示、智能感知、预编译错误突出显示、重构等。它们可能有像 Eclipse 一样的完整内置编译器,提供智能增量编译。

更原始的集成级别更有可能有效地“屏蔽”javac,可能是通过 Ant。

It will entirely depend on the editor - but "advanced" IDEs will usually have at least a parser built in, to provide syntax highlighting, IntelliSense, pre-compilation error highlighting, refactoring etc. They may have a full built-in compiler like Eclipse does, to offer smart incremental compilation.

A more primitive level of integration is more likely to effectively "shell out" to javac, possibly by way of Ant.

热鲨 2024-08-11 02:27:03

编辑者的共同点是,他们将更改(“编辑”)应用于文件系统上的文件。基本上,Java 编辑器读取 Java 文本文件,允许更改文本并允许保存编辑的内容。

编译或执行 Java 应用程序是一个单独的操作,通常调用 javac(或 java)可执行文件来编译(或执行)java 文件。

Editors have in common, that they apply changes ('edits') to a file on a file system. So basically, the Java editor reads the Java text file, allows changes to the text and allows saving the edited content.

Compiling or executing a Java application is a separate action, where usually the javac (or java) executable is invoked to compile (or execute) the java files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文