- Sep 14, 2003
- 8,115
- 0
- 76
Just curious, I already do all my other programming work there and was wondering if I could integrate my Java work with it instead of using TextPad. Can I add the Java compile tools (mainly, javac.exe) to Visual Studio?
UPDATE 1/21: I did it! And very easily! Surprised no one mentioned this at all. Actually, oog mentioned you could do this, he just didn't give any details.
Basically, it's done the exact same way that TextPad does it, by simply running an .exe with certain parameters from an initial folder. With the .java file open in VS2005, go to Tools > External Tools... . Then Add, name it Compile, for command enter <path>\javac.exe, for Arguments put $(ItemFileName)$(ItemExt), and for Initial directory $(ItemDir). Same thing for Run, only use system32\java.exe, $(ItemFileName) for Arguments, and same for Initial directory.
Then just choose Compile or Run from the Tools menu. Make sure the cursor is within the document at the time of clicking it or it won't work. Works great!
UPDATE 1/21: I did it! And very easily! Surprised no one mentioned this at all. Actually, oog mentioned you could do this, he just didn't give any details.
Basically, it's done the exact same way that TextPad does it, by simply running an .exe with certain parameters from an initial folder. With the .java file open in VS2005, go to Tools > External Tools... . Then Add, name it Compile, for command enter <path>\javac.exe, for Arguments put $(ItemFileName)$(ItemExt), and for Initial directory $(ItemDir). Same thing for Run, only use system32\java.exe, $(ItemFileName) for Arguments, and same for Initial directory.
Then just choose Compile or Run from the Tools menu. Make sure the cursor is within the document at the time of clicking it or it won't work. Works great!
