| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | |
| <html> | |
| <head> | |
| <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> | |
| Creating a local Java application launch configuration | |
| </title> | |
| </head> | |
| <body> | |
| <h1> | |
| Creating a Java application launch configuration | |
| </h1> | |
| <p> | |
| When you choose <strong>Run >Run As >Java Application </strong>to | |
| launch your class, you are running your class using a generic <strong>Java | |
| Application</strong> launch configuration that derives most of the launch | |
| parameters from your Java project and your workbench preferences. In | |
| some cases, you will want to override the derived parameters or specify | |
| additional arguments. | |
| </p> | |
| <p> | |
| You do this by creating your own <strong>Java Application</strong> launch | |
| configuration. | |
| </p> | |
| <ol> | |
| <li> | |
| Select <strong>Run >Run... </strong>or <strong>Run >Debug...</strong> | |
| from the workbench menu bar. This opens a dialog that lets you | |
| create, modify, and delete launch configurations of different types. | |
| </li> | |
| <li> | |
| Select <strong>Java Application</strong> in the left hand list of launch configuration types, and press <strong>New</strong>. This will create a new launch configuration | |
| for a Java application. The tabs on the right hand side allow you | |
| control specific aspects of the launch. | |
| </li> | |
| </ol> | |
| <blockquote> | |
| <ul> | |
| <li>The <strong>Main</strong> tab defines the class to be launched. Enter the name of the project containing the class to launch in the project field, and the fully qualified | |
| name of the main class in the the Main class field. Check the <strong>Stop | |
| in main</strong> checkbox if you want the program to stop in the main method | |
| whenever the program is launched in debug mode.<br> | |
| Note: You do not have to specify a project, but doing so allows a | |
| default classpath, source lookup path, and JRE to be chosen.</li> | |
| <li>The <strong>Arguments</strong> tab defines the arguments to be passed to the application and to the virtual machine (if any). | |
| You can also specify the working directory to be used by | |
| the launched application.</li> | |
| <li>The <strong>JRE</strong> tab defines the JRE used to run or debug the application. | |
| You can select a JRE from the already defined JREs, or define a new | |
| JRE.</li> | |
| <li>The <strong>Classpath</strong> tab defines the location of class files used when running or debugging an application. By default, the user and bootstrap class locations | |
| are derived from the associated project's build path. You may | |
| override these settings here.</li> | |
| <li>The <strong>Source</strong> tab defines the location of source files used to display source when debugging a Java application. By default, these settings are derived from | |
| the associated project's build path. You may override these settings | |
| here.</li> | |
| <li>The <strong>Common</strong> tab defines general information about | |
| the launch configuration. You may choose to store the launch | |
| configuration in a specific file and specify which perspectives become | |
| active when the launch configuration is launched.</li> | |
| </ul> | |
| </blockquote> | |
| <p> | |
| <img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27"> | |
| </p> | |
| <p> | |
| <a href="../concepts/concepts-10.htm">Debugger</a><br> | |
| <a href="../concepts/clocdbug.htm">Local debugging</a> | |
| </p> | |
| <p> | |
| <br> | |
| <img border="0" src="../images/ngrelt.gif" alt="Related tasks" width="159" height="27"> | |
| </p> | |
| <p> | |
| <a href="tasks-124.htm">Choosing a JRE for launching a project</a><br> | |
| <a href="tasks-130.htm">Launching a Java program</a><br> | |
| <a href="tasks-129.htm">Setting execution arguments<br> | |
| </a><a href="../tasks/tasks-9.htm">Changing debugger launch options</a> | |
| </p> | |
| <p> | |
| <img border="0" src="../images/ngrelr.gif" alt="Related reference" width="159" height="27"> | |
| </p> | |
| <p> | |
| <a href="../reference/ref-11.htm">Debug preferences</a><br> | |
| <a href="../reference/ref-51.htm">Debug view</a><br> | |
| <a href="../reference/ref-4.htm">Run and debug actions</a> | |
| </p> | |
| <p> | |
| <br> | |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved." border="0" width="324" height= | |
| "14"></a> | |
| </p> | |
| </body> | |
| </html> | |