# How Do I: Debug a Java Project?

To set up a Java project for debugging, right-click the project folder on the Application tab, and choose Properties. In the Project Properties dialog, select Debugger in the tree on the left-hand side. Here you can set debugging options for your Java project.

To specify the class to load when you run the project from WebLogic Workshop, enter the qualified class name in the Main class field. For example, to begin debugging the MazeClient class in the ProxyClient project in SamplesApp, you would enter "mazegen.java_client.MazeClient" for the main class. You can then set a breakpoint on a function in that class, such as main(), and click the Start button. The class is loaded into memory, the main() function is called as the entry point into the class, and execution halts on the breakpoint.

You can also specify parameters to pass to the application in the Parameters field, and parameters to pass to the Java virtual machine in the VM parameters field.

You can add to the Application classpath any JAR files, or the paths to class files, that your application may need and that are not already available as libraries in your application.

By default the options are checked to automatically append all Library JARs and the server classpath. It's a good idea to leave these options checked unless you know that your Java project requires neither.

To learn more about debugging with WebLogic Workshop, see Debugging Your Application.

Related Topics

Debugging Your Application