blob: 5ca3251ccaa36c4e5a0387f92840b484db73ad48 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. 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"> </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.&nbsp;
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.&nbsp; 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.png" alt="Opens the Debug Launch Configuration dialog"> <strong>Run &gt; Debug...</strong></a> from
the workbench menu bar (or <strong>Debug...</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>. the rest of these instructions
assume you have chosen this option. The <em>Standard (Socket Listen)</em> connection
type creates a launch that will listen for incoming connections from a remote
VM. You will need to specify a port that the launch will listen at.</li>
<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>
<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.&nbsp;</p>
<p> <img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
<a href="../concepts/cdebugger.htm">Debugger</a><br>
<a href="../concepts/cremdbug.htm">Remote Debugging</a> </p>
<p> <img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<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> </p>
<p> <img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
<a href="../reference/views/debug/ref-debug_view.htm">Debug view</a> </p>
</body>
</html>