| <!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." > |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| |
| <title>New Java Project Wizard</title> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script> |
| </head> |
| |
| <body> |
| <h1>New Java Project Wizard</h1> |
| |
| <p>The |
| <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.JavaProjectWizard)")'> |
| <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the New Java Project wizard"> |
| <b>New Java Project</b></a> wizard |
| helps you create a new Java project in the workbench.</p> |
| |
| <h2>Project name page</h2> |
| |
| <table border="1" cellspacing="0" cellpadding="5" summary="Project name page"> |
| <tr> |
| <th>Option</th> |
| |
| <th>Description</th> |
| |
| <th>Default</th> |
| </tr> |
| |
| <tr> |
| <td align="left" valign="top">Project name</td> |
| |
| <td align="left" valign="top">Type a name for the new project.</td> |
| |
| <td align="left" valign="top"><blank></td> |
| </tr> |
| |
| <tr> |
| <td valign="top"> |
| Contents |
| </td> |
| <td valign="top"> |
| <dl> |
| <dt> |
| <strong>Create new project in workspace:</strong> |
| </dt> |
| <dd> |
| When selected, the New Project Wizard will create a new project with the specified name in the workspace. |
| </dd> |
| <dt> |
| <strong>Create project from existing source:</strong> |
| </dt> |
| <dd> |
| When selected, you can specify the location from which the New Java Project Wizard will retrieve |
| an existing Java project. In this case the wizard will analyze the existing project and set up the |
| build path automatically. |
| <br>Click on <strong>Browse...</strong> to browse for a location of an existing Java project. |
| </dd> |
| </dl> |
| </td> |
| <td valign="top"> |
| workspace |
| </td> |
| </tr> |
| |
| <tr> |
| <td valign="top"> |
| JRE |
| </td> |
| <td valign="top"> |
| <dl> |
| <dt> |
| <strong>Use default JRE:</strong> |
| </dt> |
| <dd> |
| When selected, the New Java Project Wizard creates a new Java project which uses the workspace default JRE. |
| The default JRE can be configured on the <a href="./preferences/java/debug/ref-installed_jres.htm">Java > Installed JREs</a> preference page.<br> |
| The project will also use the default compiler compliance which can be configured on the <a href="preferences/java/ref-preferences-compiler.htm">Java > Compiler</a> preference page.<br> |
| Click on <b>Configure default...</b> to configure the default JRE and compiler compliance. |
| </dd> |
| <dt> |
| <strong>Use project specific JRE:</strong> |
| </dt> |
| <dd> |
| When selected, you can explicitly specify the JRE to be used for the new Java project. The new project will use a compiler compliance |
| which matches the version of the selected JRE. |
| </dd> |
| <dt> |
| <strong>Use an execution environment JRE:</strong> |
| </dt> |
| <dd> |
| When selected, you can specify an execution environment to be used for the new Java project. The new project will use a compiler compliance |
| which fits best the selected execution environment.<br> |
| Execution environments can be configured on the <a href="preferences/java/debug/ref-execution_environments.htm">Java > Installed JREs > Execution Environments</a> preference page. |
| </dd> |
| </dl> |
| </td> |
| <td valign="top"> |
| Use default JRE |
| </td> |
| </tr> |
| |
| <tr> |
| <td valign="top"> |
| Project layout |
| </td> |
| <td valign="top"> |
| <dl> |
| <dt> |
| <strong>Use project folder as root for sources and class files:</strong> |
| </dt> |
| <dd> |
| When selected, the project folder is used both as source folder and as output folder for class files. |
| </dd> |
| <dt> |
| <strong>Create separate folders for sources and class files:</strong> |
| </dt> |
| <dd> |
| When selected, the New Java Project Wizard creates a source folder for Java source files and an output folder which holds the class files of the project. |
| </dd> |
| </dl> |
| </td> |
| <td valign="top"> |
| Create separate folders for sources and class files |
| </td> |
| </tr> |
| |
| <tr> |
| <td valign="top"> |
| Working sets |
| </td> |
| <td valign="top"> |
| <dl> |
| <dt> |
| <strong>Add project to working sets:</strong> |
| </dt> |
| <dd> |
| When selected, the new project will be added to the working sets shown in <strong>Working Sets</strong> drop down field. The drop down field |
| shows a list of previous selected working sets.<br> |
| Click on <strong>Select...</strong> to select working sets to which to add the new project. |
| </dd> |
| </dl> |
| </td> |
| <td valign="top"> |
| Depends on the context from which the wizard has been started |
| </td> |
| </tr> |
| |
| </table> |
| |
| <h2>Java Build Path page</h2> |
| |
| <p>You can skip this page by pressing <span class="control">Finish</span> on the first page. Otherwise press <span class="control">Next</span> to configure the Java build path. |
| </p> |
| The Java build path consist of source, library and project entries. The user interface is the same as for the <a href="../reference/ref-properties-build-path.htm">Build Path</a> property page, except for |
| the source tab: |
| |
| <h2>Source tab</h2> |
| |
| <p>Source folders are top-level folders in the project hierarchy. They are the root of packages containing .java files. |
| The compiler will translate the contained files to .class files that will be written to the output folder.</p> |
| <p>Source folders allow to structure the project, for example to separate |
| test from the application in two source folders. Within a source folder, a more detailed structuring can be acived by using packages.</p> |
| <p>Each source folder can define an exclusion filter to specify which |
| resources inside the folder should not be visible to the compiler.</p> |
| <p>Resources existing in source folders are copied to the output folder unless the setting in the <a href="preferences/java/compiler/ref-preferences-building.htm">Java > Compiler > Building</a> preference |
| page specifies that the resource is filtered. The output folder is defined per project except if a source folder specifies its own output folder.</p> |
| |
| <p>The tree shows the project as it will look like when switching to the package explorer. Several operations can be executed |
| on this tree to change the structure of the project.</p> |
| |
| <table border="1" cellspacing="0" cellpadding= "5" summary="Source folder options" width="600"> |
| |
| <tbody> |
| <tr> |
| <th>Icon</th> |
| |
| <th>Option</th> |
| |
| <th>Description</th> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="5%"><img src="../images/org.eclipse.jdt.ui/etool16/newpackfolder_wiz.gif" alt="Add to build path" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Add source folder</td> |
| |
| <td align="left" valign="top">Add a folder to the Java build path as source folder.</td> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"><img src="../images/org.eclipse.jdt.ui/elcl16/add_linked_source_to_buildpath.gif" alt="Link additional source to project" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Link additional source to project</td> |
| |
| <td align="left" valign="top">Add a link to a folder in the file system as source folder to the Java build path. |
| </td> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"><img src="../images/org.eclipse.jdt.ui/elcl16/remove_as_source_folder.gif" alt="Remove from buildpath" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Remove from buildpath</td> |
| |
| <td align="left" valign="top">Remove a source folder from the Java build path and change it into a normal folder.</td> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"><img src="../images/org.eclipse.jdt.ui/elcl16/exclusion_filter_attrib.png" alt="Exclude" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Exclude</td> |
| |
| <td align="left" valign="top">Add a resource to the exclusion filter of it's parent source folder. |
| The excluded resource and all its children are no longer visible to the compiler. |
| </td> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"><img src="../images/org.eclipse.jdt.ui/elcl16/inclusion_filter_attrib.png" alt="Include" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Include</td> |
| |
| <td align="left" valign="top">Includes a previously excluded resource.</td> |
| |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"><img src="../images/org.eclipse.jdt.ui/elcl16/configure_buildpath_filters.png" alt="Configure source folder properties" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Configure source folder properties</td> |
| |
| <td align="left" valign="top"><p>The edit source folder property menu has two actions</p> |
| <ol> |
| <li><strong>Configure Inclusion / Exclusions Filters</strong>: Customize the inclusion and exclusion filters by defining string patterns. |
| It is possible to use wildcard in patters (i.e. to exclude all java files which |
| start with "Test" write "Test*.java").</li> |
| <li><strong>Configure Output Folder</strong>: Change the output folder for a source folder. This action is only enabled if |
| <strong>Allow output folders for source folders</strong> is enabled.</li> |
| </ol></td> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"><img src="../images/org.eclipse.jdt.ui/elcl16/clear_co.png" alt="Undo all changes" border="0" ></td> |
| |
| <td align="center" valign="middle" width="20%">Undo all changes</td> |
| |
| <td align="left" valign="top">All changes that have been applied to the project in this wizard will be withdrawn and the original |
| state of the project is reconstructed. |
| </td> |
| </tr> |
| |
| <tr> |
| <td align="center" valign="middle" width="05%"> </td> |
| |
| <td align="center" valign="middle" width="20%">Allow output folders for source folders</td> |
| |
| <td align="left" valign="top">If enabled, each source folder can have its own output folder. Otherwise all source folders will use the |
| default output folder.</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <p>A shorter description of all operations is visible in the <strong>Details</strong> pane below the project tree.</p> |
| |
| <h2>Library tab, Project tab and Order Tab</h2> |
| See <a href="../reference/ref-properties-build-path.htm">Build Path</a> property page for more details. |
| |
| <p><img src="../images/ngrelc.png" alt="Related concepts" border="0" ></p> |
| <p> |
| <a href="../concepts/concept-java-project.htm">Java projects</a><br> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" > |
| </p> |
| <p> |
| <a href="../reference/ref-menu-file.htm">File actions</a> |
| </p> |
| </body> |
| </html> |
| |