Visual J++
Bringing up Visual J++
- From the Start menu, select Programs, Microsoft
J++, Microsoft Developer Studio.
- If a "Tip of the Day" appears, just click Close.
Creating a project
- Under the File menu, select New....
- Click on Java Project.
- Type in a project name, for example Week1.
- Click Ok.
- There is a window pane on the left that has 3 tabs.
Select the FileView tab.
Adding a file to a project
- In the File View pane, right click on "Week1 files",
and select Add Files to Project....
- Type in the file name to add, for example Week1.java.
- Click Ok.
- A dialog box will tell you that the file does not yet
exist. Click Yes.
- If the file list is not already expanded, click on the
little plus sign [+] to the left of "Week1 files".
- Double click on the file that you just created.
- A dialog box will ask you if you want to create the file.
Click Yes.
Compiling a Java source file
- In the File View, right click on the file name.
- Select Compile Week1.java.
- If there are compile errors, the will show up in the bottom
pane. If you double click a compile error, Visual J++ will
show you exactly where the error is.
Setting up to run a Java application
- In the File View, right click on "Week1 files",
and select Settings...
- Select the Debug tab.
- Type in the class for debugging/executing, for example
Week1.
- Select Stand-alone interpreter.
- Click on Ok.
Setting up to run a Java applet
- In the File View, right click on "Week1 files",
and select Settings...
- Select the Debug tab.
- Type in the class for debugging/executing, for example
Week1Applet.
- Select Browser.
- Click on Ok.
Running a Java application
- Click on the red exclaimation mark (!).
- If you get prompted to rebuild files, select Yes.
- A DOS box will appear with the program output.
- If the DOS box goes away before you can read it,
add while (true); to the end of your
application's main method.
Running a Java applet
- Click on the red exclaimation mark (!).
- If you get prompted to rebuild files, select Yes.
- A browser will appear with your applet running.