Testing and debugging in the visual editor

After you write a Java class using the visual editor for Java, you can run it to test and debug the run-time behavior.

If the class has a public static void main(String[]) method, you can run or debug it as a Java application. However, when you write a Java bean using the visual editor for Java, it will not typically have a main method. Rather than adding a main method just to test the class, you can run or debug the class as a Java bean.

To debug a Java bean while you are testing it, you can switch to the Debug perspective, where the Java processes can be seen and where you can use breakpoints and step through the code.

Parent topic: Editing Java in the visual editor

Related tasks
Running a Java bean or application
Configuring options for running a Java bean or application
Testing and deploying applets
Debugging a visual Java bean or application

(C) Copyright IBM Corporation 1999, 2004. All Rights Reserved.