| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html lang="en"> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <title>Using the remote Java application launch configuration</title> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script> |
| </head> |
| <body> |
| <h1> Using the remote Java application launch configuration </h1> |
| <p>The <strong>Remote Java Application </strong> launch configuration should |
| be used when debugging an application that is running on a remote VM. |
| Since the application is started on the remote system, the launch configuration |
| does not specify the usual information about the JRE, program arguments, or |
| VM arguments. Instead, information about connecting to the application |
| is supplied. </p> |
| <p>To create a <strong>Remote Java Application</strong> launch configuration, |
| do the following: </p> |
| <ol> |
| <li> Select <a class="command-link" href='javascript:executeCommand("org.eclipse.debug.ui.commands.OpenDebugConfigurations")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="Opens the Debug Launch Configuration dialog"> <strong>Run > Debug Configurations...</strong></a> from |
| the workbench menu bar (or <strong>Debug Configurations...</strong> from the drop-down menu |
| on the <strong>Debug</strong> tool bar button) to show the launch configuration |
| dialog. </li> |
| <li> Select the <strong>Remote Java Application</strong> in the list of configuration |
| types on the left. </li> |
| <li> Click the <strong>New</strong> toolbar button. A new remote launch configuration |
| is created and three tabs are shown: <strong>Connect</strong>, <strong>Source</strong>, |
| and <strong>Common</strong>. </li> |
| <li> In the <strong>Project</strong> field of the <strong>Connect</strong> tab, |
| type or browse to select the project to use as a reference for the launch |
| (for source lookup). A project does not need to be specified. </li> |
| <li> The <strong>Connection Type</strong> field of the <strong>Connect</strong> tab |
| allows you to choose how you will connect to the virtual machine. In most |
| cases, you will be attaching to the VM at a specific location, in which case |
| select <em>Standard (Socket Attach)</em>. |
| <ul> |
| <li> In the <strong>Host</strong> field of the <strong>Connect</strong> tab, |
| type the IP address or domain name of the host where the Java program is |
| running.<br> |
| If the program is running on the same machine as the workbench, type <em>localhost</em>. </li> |
| <li> In the <strong>Port</strong> field of the <strong>Connect</strong> tab, |
| type the port where the remote VM is accepting connections. Generally, this |
| port is specified when the remote VM is launched. </li> |
| </ul> |
| The <em>Standard (Socket Listen)</em> connection type listens |
| for incoming connections from a remote VM. It is typically used |
| for debugging an application that spans multiple VMs, such |
| as a distributed system. |
| <ul> |
| <li> In the <strong>Port</strong> field of the <strong>Connect</strong> tab, |
| type the port on your local machine where the remote VM should |
| connect to. Generally, your host and this port is specified |
| when the remote VM is launched.</li> |
| <li> In the <strong>Connection limit</strong> field of the <strong>Connect</strong> |
| tab, type the number of expected connections, or |
| <tt>0</tt> to support an unlimited number of connections.</li> |
| </ul> |
| <li> The <strong>Allow termination of remote VM</strong> flag is a toggle that |
| determines whether the <strong>Terminate</strong> command is enabled in the |
| debugger. Select this option if you want to be able to terminate the VM to |
| which you are connecting. </li> |
| <li> Click <strong>Debug</strong>. The launch attempts to connect to a VM at |
| the specified address and port, and the result is displayed in the Debug |
| view. If the launcher is unable to connect to a VM at the specified address, |
| an error message appears. </li> |
| </ol> |
| <p>Specific instructions for setting up the remote VM should be obtained from |
| your VM provider. </p> |
| |
| <h3 class="related">Related concepts</h3> |
| <a href="../concepts/cdebugger.htm">Debugger</a><br> |
| <a href="../concepts/cremdbug.htm">Remote Debugging</a> |
| <h3 class="related">Related tasks</h3> |
| <a href="../tasks/task-launching_java_program.htm">Launching a Java program</a><br> |
| <a href="task-disconnect_remote_debug.htm">Disconnecting from a VM</a><br> |
| <a href="../tasks/tasks-executionArgs.htm">Setting execution arguments</a> |
| <h3 class="related">Related references</h3> |
| <a href="../reference/views/debug/ref-debug_view.htm">Debug view</a> |
| </body> |
| </html> |