开发者

How do I set up a Java-like language (LeJOS NXJ) in Visual Studio 2005 that uses an external compiler?

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# co开发者_如何学运维lor 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?


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 :-)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜