How to: Compile a Java-language Application in Visual J#
You can compile many of your Java Development Kit (JDK) 1.2 applications seamlessly in J#. Applications use Abstract Window Toolkit (AWT) or native java functionality compile with little or no manual upgrading.
The following procedure shows you how to create your own project, add your existing .java files, and compile them with J#.
The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see.
To compile your JDK application in Visual J#
Create a new console application.
The console application displays a default J# application file. Since your application is not currently working with J#, the Program.jsl is not necessary.
In Solution Explorer, right-click on the Program.jsl file and point to Exclude From Project.
Visual Studio removes the Program.jsl from the project without deleting the file. When you compile, the Program.jsl will not be included in the list of files to build. If you change your mind and would like to add the Program.jsl back into the project, you may do so. You may add any kind of file, however, Visual J# will only compile files with the .java or .jsl extensions.
Right-click on the project name, point to Add, and then Existing Item to add your .java files to the project.
Ctrl + Click on one or more existing.java files.
Press OK to add them to the new project.
The files you just added display in the Solution Explorer.
Click File and Save All to store the project.
Right-click on the project name and point to Properties.
The Configuration dropdown list shows which configuration is active.
In the Configuration dropdown list select Debug or Release.
When you compile with the Debug configuration, the compiler adds symbols for stepping through the code. The Release configuration creates a smaller assembly for distribution.
Press F5 to run compile and run the program.
Click Debug Start.
Click Build Solution.
Visual J# compiles the project and places the .exe assembly in the bin\debug directory depending on the configuration setting.
At the bottom of the screen, review the compiler status in Output window.
If the program did not compile, click on the Error tab for details.
Highlight the error, and press F1 for detailed help about how to correct the problem.