If using old JDKs (before JDK 5), you may need to pass -Xnoagent -Djava.compiler=NONE as well.

When dt_socket transport is used, the address property specified the port number.
On MS Windows, dt_shmem transport can be used for faster shared-memory communication when both application and debugger are running on the same computer. The the address specifies the name of a shared memory region.

Attaching to the application from NetBeans

Select the appropriate connection type (with respect to the value of the " transport " sub-option).

Enter values of other options:

If you use " dt_socket " transport: Enter the hostname of computer where the debugged application is running (can be "localhost" if it is on the same computer) into the Host field.Enter the selected port number into the Port field.

If you use " dt_shmem " tranport (only for MS Windows): Enter the shared memory name (e.g. "myapp").