General Setup for Java

The general setup for debugging Java Applications supports two options:

  • Debug an Application
  • Attach to an application that is running

Option 1 - Debug an Application



See also


Select Java.


Select this checkbox if you are debugging a 64-bit application.

Deselect the checkbox if you are debugging a 32-bit application.


Select Run.

Default Directory

This path is added to the class path property when the Java Virtual Machine is created.

Application Class

Identify the fully qualified Class name to debug; the Class must have a method declared with this signature:

     public static void main(String());

Command Line Arguments

Specify any parameters to be passed to the main method of the Application Class above.

Parameters containing spaces should be surrounded with double quotes.

Java Virtual Machine Options

Specify command line options for Virtual Machine creation.

You also must provide a parameter (JRE) as the path to be searched for the jvm.dll; this is the DLL supplied as part of the Java runtime environment or Java JDK from Sun MicrosystemsTM.

The JRE parameter can be either:

  • An Enterprise Architect-defined Local Path
  • An absolute file path (with no double quotes) to the installation folder of the Java JDK to be used for debugging

The JRE parameter must point to the installation folder for the Java JDK. A JDK installation is necessary for debugging to succeed. The JRE should not point to the installation of the public Java Runtime Environment, if that is installed. Environment variables can be used when specifying the VM startup options, such as classpath.

For example, using:

  • An Enterprise Architect Local Path JAVA and an environment variable classpath:

  • Or an absolute path to the JDK installation directory and an environment variable classpath:

In these two examples, the debugger will create a virtual machine using the JDK located at the value of the JRE parameter.

If no classpath is specified, the debugger always creates the virtual machine with a class path property equal to any path contained in the environment variable plus the path entered in the default working directory of this script.

If source files and .class files are located under different directory trees, the classpath property MUST include both root path(s) to the source and root path(s) to binary class files.

Option 2 - Attach to Virtual Machine

There is very little to specify when attaching to a VM; however, the VM must have the Sparx Systems debugging agent loaded.



See also


Select Java

Attach to Virtual Machine Debug Another Process Debug Tomcat Server


Select Attach to Virtual Machine

Learning Center topics

  • Alt+F1 | Enterprise Architect | Build and Debug | Debug | Java