I use netbeans but was wondering if anyone knew how to add a Java compiler to visual studio 2008?

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.

commented: Thanks for replying though. +2

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.