如何在使用外部编译器的 Visual Studio 2005 中设置类 Java 语言 (LeJOS NXJ)?
最近,我安装了 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您使用 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 :-)
您确实应该使用 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.