blob: 076548126f6d7ae9a992e71b1d9b2c7735d0d397 [file] [log] [blame]
<!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">
<title>
JAR File Exporter
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</head>
<body>
<h1>
JAR File Exporter
</h1>
<p>
The
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.file.export(exportWizardId=org.eclipse.jdt.internal.ui.jarpackager.JarPackageWizard)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="Opens the JAR export wizard">
<b>Jar Export</b></a> wizard
allows you to create a JAR file.
</p>
<h2>
JAR package specification
</h2>
<p>
JAR Specification Options:
</p>
<table border="1" cellspacing="0" cellpadding="5" summary="JAR specification options">
<tbody>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
<tr>
<td align="left" valign="top">
<p>
Select the resources to export
</p>
</td>
<td align="left" valign="top">
<p>
In the list, check or clear the boxes to specify exactly the files that you want to export to the JAR file. This list is initialized by the workbench selection.
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Export generated class files and resources
</p>
</td>
<td align="left" valign="top">
<p>
If enabled, then generated class files and resources are included in the JAR.
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Export all output folders for checked projects
</p>
</td>
<td align="left" valign="top">
<p>
If enabled, then all output folders are included in the JAR.
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Export Java source files and resources
</p>
</td>
<td align="left" valign="top">
<p>
If enabled, then Java source files and resources are included in the JAR.
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Export refactorings for checked projects
</p>
</td>
<td align="left" valign="top">
<p>
If enabled, then refactoring scripts for the selected projects are included in the JAR. This allows
clients to migrate to the new JAR by executing all the stored refactorings in the JAR.
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Select the export destination
</p>
</td>
<td align="left" valign="top">
<p>
Enter an external file system path and name for a JAR file (either new or existing). Either type a valid file path in the field or click Browse to select a file via
a dialog.
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Options
</p>
</td>
<td align="left" valign="top">
<p>
You can select any of the following options:
</p>
<ul>
<li>
<strong>Compress the contents of the JAR file&nbsp;</strong>: to create a compressed JAR file
</li>
<li>
<strong>Add directory entries</strong>: adds an entry for each directory to the JAR file, even if the directory does only contain subdirectories.
</li>
<li>
<strong>Overwrite existing files without warning</strong> : if an existing file might be overwritten, you are prompted for confirmation. This option is applied to
the JAR file, the JAR description, and the manifest file.
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<h2>
JAR packaging options
</h2>
<p>
JAR Options:
</p>
<table border="1" cellspacing="0" cellpadding="5" summary="JAR options">
<tbody>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
<tr>
<td align="left" valign="top">
<p>
Select options for handling problems
</p>
</td>
<td align="left" valign="top">
<p>
Choose whether to export classes with certain problems:
</p>
<ul>
<li>
Export class files with compile errors
</li>
<li>
Export class files with compile warnings
</li>
</ul>
</td>
</tr>
<tr>
<td>
Create source folder structure
</td>
<td>
Selected this option if you want the source folder structure to be rebuilt in the JAR. This option is only enabled when source files but no class files are
exported.&nbsp;
</td>
</tr>
<tr>
<td>
Build projects if not build automatically
</td>
<td>
Select this option to force a rebuild before exporting. It is recommended to build be before exporting so the exported class files are up to date.
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Save the description of this JAR in the workspace
</p>
</td>
<td align="left" valign="top">
<p>
If you select this option, you can create a file in the workbench describing the JAR file you are creating. Either type and/or browse to select a path and name for
this new file.
</p>
</td>
</tr>
</tbody>
</table>
<h2>
JAR manifest specification
</h2>
<p>
JAR Manifest Specification Options (Available when class file are exported):
</p>
<table border="1" cellspacing="0" cellpadding="5" summary="JAR manifest specification">
<tbody>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
<tr>
<td align="left" valign="top">
<p>
Specify the manifest
</p>
</td>
<td align="left" valign="top">
<p>
Choose the source of the manifest file for this JAR file:
</p>
<ul>
<li>
<b>Generate the manifest file</b> (you can also choose either to save or reuse and save the new manifest file)
</li>
<li>
<b>Use existing manifest from workspace</b>
</li>
</ul>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Seal contents
</p>
</td>
<td align="left" valign="top">
<p>
Choose which packages in the JAR file must be sealed:
</p>
<ul>
<li>
<b>Seal the JAR</b> to seal the entire JAR file; click&nbsp;<strong>Details</strong> to exclude selectively
</li>
<li>
<b>Seal some packages</b> click&nbsp;<strong>Details</strong> to choose selectively
</li>
</ul>
<em>Note: This option is only available if the manifest is generated.</em>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p>
Select the class of the application entry point&nbsp;
</p>
</td>
<td align="left" valign="top">
<p>
Type or click&nbsp;<strong>Browse</strong> to select the main class for the JAR file, if desired.
</p>
<em>Note: This option is only available if the manifest is generated.</em>
</td>
</tr>
</tbody>
</table>
<p>
<h3 class="related">Related tasks</h3>
<p>
<a href="../tasks/tasks-32.htm">Creating JAR files</a>
</p>
<p>
<h3 class="related">Related references</h3>
<p>
<a href="../reference/ref-menu-file.htm">File actions</a>
</p>
</body>
</html>