Visual J++

Bringing up Visual J++

  1. From the Start menu, select Programs, Microsoft J++, Microsoft Developer Studio.
  2. If a "Tip of the Day" appears, just click Close.

Creating a project

  1. Under the File menu, select New....
  2. Click on Java Project.
  3. Type in a project name, for example Week1.
  4. Click Ok.
  5. There is a window pane on the left that has 3 tabs. Select the FileView tab.

Adding a file to a project

  1. In the File View pane, right click on "Week1 files", and select Add Files to Project....
  2. Type in the file name to add, for example Week1.java.
  3. Click Ok.
  4. A dialog box will tell you that the file does not yet exist. Click Yes.
  5. If the file list is not already expanded, click on the little plus sign [+] to the left of "Week1 files".
  6. Double click on the file that you just created.
  7. A dialog box will ask you if you want to create the file. Click Yes.

Compiling a Java source file

  1. In the File View, right click on the file name.
  2. Select Compile Week1.java.
  3. 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

  1. In the File View, right click on "Week1 files", and select Settings...
  2. Select the Debug tab.
  3. Type in the class for debugging/executing, for example Week1.
  4. Select Stand-alone interpreter.
  5. Click on Ok.

Setting up to run a Java applet

  1. In the File View, right click on "Week1 files", and select Settings...
  2. Select the Debug tab.
  3. Type in the class for debugging/executing, for example Week1Applet.
  4. Select Browser.
  5. Click on Ok.

Running a Java application

  1. Click on the red exclaimation mark (!).
  2. If you get prompted to rebuild files, select Yes.
  3. A DOS box will appear with the program output.
  4. 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

  1. Click on the red exclaimation mark (!).
  2. If you get prompted to rebuild files, select Yes.
  3. A browser will appear with your applet running.