2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by firstPerson
1

You need to download and install the Java JDK. Create a project in Visual Studio and delete the automatically generated Class file. Add a new text file. This text file can be used to write any standard Java code. Once again, add another text file called Compile.bat and leave it empty. Go to Tools > External Tools and add a new enty and call this one Javac, you need to make sure that you set the command path to your Compile.bat file and the project directory should be set to the ProjectDir macro path. Click on Use Output Window and put the following in your Compile.bat file:
del Output /S /Q
2.mkdir Output
3.javac *.java -d Output
4.cd Output
5.start java MyApplication

Modify your java application file so that you have a System.in.read() call at the end.

So we are almost finished, click on Tools -> Javac and watch your application compile.

Votes + Comments
Thanks for replying though.
0

You need to download and install the Java JDK. Create a project in Visual Studio and delete the automatically generated Class file. Add a new text file. This text file can be used to write any standard Java code. Once again, add another text file called Compile.bat and leave it empty. Go to Tools > External Tools and add a new enty and call this one Javac, you need to make sure that you set the command path to your Compile.bat file and the project directory should be set to the ProjectDir macro path. Click on Use Output Window and put the following in your Compile.bat file:
del Output /S /Q
2.mkdir Output
3.javac *.java -d Output
4.cd Output
5.start java MyApplication

Modify your java application file so that you have a System.in.read() call at the end.

So we are almost finished, click on Tools -> Javac and watch your application compile.

Yea I know that method, but its hard to use the debugger. I
realized that java was discontinued with visual after 05. Thanks
for the input though.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.