blob: d62132f0c2ff637f22cb9f5c0535afccf80f45ad [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="copyright" content=
"Copyright (c) IBM Corporation and others 2000, 2011. 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=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type=
"text/css" />
<title>
Setting execution arguments
</title>
<script language="JavaScript" src=
"PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript">
</script>
</head>
<body>
<h1>
Setting execution arguments
</h1>
<p>
If you want to specify execution arguments for your program, you must
define a launch configuration that specifies the arguments.
</p>
<ol>
<li>Select <a class="command-link" href=
'javascript:executeCommand("org.eclipse.debug.ui.commands.OpenRunConfigurations")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt=
"Opens the Run Launch Configurations dialog" /> <strong>Run &gt; Run
Configurations...</strong></a> or <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 Configurations dialog" /> <strong>Run &gt;
Debug Configurations...</strong></a> from the workbench
<strong>Run</strong> menu to open the list of launch
configurations.&nbsp;&nbsp; Launch configurations for Java programs are
shown underneath <strong>Java Application</strong> in this list.&nbsp;
</li>
<li>Select an existing configuration or create a new launch configuration
by pushing the <strong>New</strong> button after selecting <strong>Java
Application</strong>.
</li>
<li>On the <strong>Arguments</strong> tab for the configuration, you can
specify the following fields as necessary:
<ul>
<li>
<strong>Program Arguments</strong>: Application-specific values
that your code is expecting (a user name or a URL for locating help
files, for example).
</li>
<li>
<strong>VM Arguments</strong>: Values meant to change the behavior
of the Java virtual machine (VM). For example, you may need to tell
the VM whether to use a just-in-time (JIT) compiler, or you may
need to specify the maximum heap size the VM should use. Refer to
your VM's documentation for more information about the available VM
arguments.
</li>
<li>
<strong>Other options</strong>: This allows to set the option
<strong>-XX:+ShowCodeDetailsInExceptionMessages</strong>
when the checkbox is checked. This is selected by default for a launch configuration using Java 14 and above.
</li>
<li>
<strong>@argfile</strong>: When the list of application-specific and VM arguments become very long
this checkbox can be checked. All arguments will then be written into a file and the file is
passed to the VM as single argument. This is only supported for a launch configuration using Java 9 and above.
</li>
<li>
<strong>Working Directory</strong>: The working directory used for
the launched process. To change from using the default working
directory, select <strong>Other</strong> and specify the workspace
or local directory to use for the working directory of the launched
process.
</li>
</ul>
</li>
<li>Click <strong>Apply</strong> or&nbsp; <strong>Close</strong> when you
are done. Every time you launch this configuration, these execution
arguments will be used.
</li>
</ol>
<h3 class="related">Related tasks</h3>
<a href="../tasks/tasks-java-local-configuration.htm">Creating a Java
Application launch configuration</a><br />
<a href="task-launching_java_program.htm">Launching a Java
program</a>
</body>
</html>