如何在使用外部编译器的 Visual Studio 2005 中设置类 Java 语言 (LeJOS NXJ)?

发布于 2024-08-07 18:13:13 字数 274 浏览 8 评论 0原文

最近,我安装了 JDK 和一个名为 LeJOS NXJ 的 java 库,用于控制 LEGO Mindstorms 机器人。我希望能够设置语言以通过 Visual Studio 运行,它提供 J# 颜色编码。编译程序的命令行是:

nxjc "Myfile.java"

将程序部署或下载到控制器的命令行是:

nxj -r "Myfile"

如何设置使 Visual Studio 使用这些选项的方法?

Recently, I installed the JDK and a java library called LeJOS NXJ, for controlling a LEGO Mindstorms robot. I'd like to be able to set up the language to run through visual studio, which offers J# color coding. The command line to compile the program is:

nxjc "Myfile.java"

and the command line to deploy or download the program to the controller is:

nxj -r "Myfile"

How can I set up a way to make Visual Studio use these options?

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

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

发布评论

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

评论(2

↘人皮目录ツ 2024-08-14 18:13:13

当您使用 Visual Studio for Java 工作时,该编辑器或多或少与记事本一样舒适且有用,因此我强烈建议使用完全支持 Java 的 IDE 来完成此类工作。 LeJOS 有支持 Eclipse 和 Netbeans 的插件,这是两个完整、开源、免费且易于使用的 IDE。

尝试一下(我会从 Netbeans 开始,但这完全是个人选择),您会立即发现在尝试将 Java 硬塞到 VS 中时缺少什么:-)

When you use Visual Studio for Java work, the editor is more or less as comfortable and helpful as Notepad, so I'd strongly suggest to use an IDE with full Java support for this kind of work. There are plugins for LeJOS support for both Eclipse and Netbeans, two complete, open source, free and easy-to-use IDE's.

Try them (I'd start with Netbeans but that's entirely a personal choice) and you'll see right away what you're missing when trying to shoehorn Java into VS :-)

十年九夏 2024-08-14 18:13:13

您确实应该使用 Eclipse,因为 Eclipse 插件已得到极大增强。

Netbeans 支持已被删除,因为 leJOS 过去提供的(非常简单的)Netbeans 插件从来都不是很方便。它从未正确覆盖 NXT 端程序的项目引导类路径。

带有用于 Ant(或支持 Ant 的任何内容)的示例 build.xml 的示例项目仍然可用。然而,编程体验不会像使用 Eclipse 那样顺利。

You should really be using Eclipse, as the Eclipse plug-in has been greatly enhanced.

Netbeans support has been dropped, as the (very simple) Netbeans plug-in that leJOS provided in the past never really was very convenient. It never properly overrided the bootclasspath of projects for NXT-side programs.

Example projects with a sample build.xml for use with Ant (or anything that supports Ant) is still available. However, the programming experience will not be as smooth as with Eclipse.

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