Skip to content

Commit ef1357b

Browse files
author
gk_brown
committed
Update default includes for bundled JRE.
git-svn-id: https://svn.java.net/svn/appbundler~svn@22 07572b26-92e5-4d45-f66a-c18421440a21
1 parent 9c660ba commit ef1357b

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

appbundler/doc/appbundler.html

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,10 @@ <h4>runtime</h4>
114114

115115
<p>This element is optional. If specified, the base directory of the fileset must point to the
116116
root directory of a valid Java runtime environment. The contents of the runtime will be copied to
117-
the <tt>Contents/PlugIns/</tt> folder of the generated application bundle. By default, the
118-
following content will be excluded from the bundled runtime:</p>
119-
120-
<ul>
121-
<li><tt>bin/</tt></li>
122-
<li><tt>jre/bin/</tt></li>
123-
<li><tt>man/</tt></li>
124-
<li><tt>src.zip</tt></li>
125-
</ul>
126-
127-
<p>Additional content can be excluded using nested <code>&lt;exclude&gt;</code> elements.</p>
117+
the <tt>Contents/PlugIns/</tt> folder of the generated application bundle. By default, only the
118+
contents of the <tt>jre/</tt> directory (minus <tt>jre/bin/</tt>) will be included in the bundled
119+
application. Additional content can be included or excluded using nested
120+
<code>&lt;include&gt;</code> and <code>&lt;exclude&gt;</code> elements, respectively.</p>
128121

129122
<p>If this element is omitted, a Java runtime environment will not be copied into the generated
130123
bundle, and target systems must have a shared JRE installed in
@@ -172,9 +165,7 @@ <h4>argument</h4>
172165

173166
<h3>Examples</h3>
174167
<p>Generate a launcher for the "Swing Set" demo, bundling the JRE defined by the <tt>JAVA_HOME</tt>
175-
environment variable with the resulting executable. In addition to the default excludes, the
176-
contents of the <tt>db/</tt> and <tt>lib/</tt> folders will also be excluded from the bundled
177-
runtime:</p>
168+
environment variable with the resulting executable.</p>
178169
<pre>
179170
&lt;-- Import environment variables --&gt;
180171
&lt;property environment="env"/&gt;
@@ -189,11 +180,9 @@ <h3>Examples</h3>
189180
displayname="SwingSet 2"
190181
identifier="com.oracle.javax.swing.SwingSet2"
191182
shortversion="1.0"
183+
applicationCategory="public.app-category.developer-tools"
192184
mainclassname="SwingSet2"&gt;
193185
&lt;runtime dir="${env.JAVA_HOME}"/&gt;
194-
&lt;exclude name="db/"/&gt;
195-
&lt;exclude name="lib/"/&gt;
196-
&lt;/runtime&gt;
197186
&lt;classpath file="/Library/Java/Demos/JFC/SwingSet2/SwingSet2.jar"/&gt;
198187
&lt;option value="-Dapple.laf.useScreenMenuBar=true"/&gt;
199188
&lt;/bundleapp&gt;

appbundler/src/com/oracle/appbundler/AppBundlerTask.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ public void addConfiguredRuntime(FileSet runtime) throws BuildException {
134134

135135
this.runtime = runtime;
136136

137+
runtime.appendIncludes(new String[] {
138+
"jre/",
139+
});
140+
137141
runtime.appendExcludes(new String[] {
138-
"bin/",
139-
"jre/bin/",
140-
"man/",
141-
"src.zip"
142+
"jre/bin/"
142143
});
143144
}
144145

build.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ questions.
117117
shortversion="1.0"
118118
applicationCategory="public.app-category.developer-tools"
119119
mainclassname="SwingSet2">
120-
<runtime dir="${env.JAVA_HOME}">
121-
<exclude name="db/"/>
122-
<exclude name="lib/"/>
123-
</runtime>
120+
<runtime dir="${env.JAVA_HOME}"/>
124121
<classpath file="/Library/Java/Demos/JFC/SwingSet2/SwingSet2.jar"/>
125122
<option value="-Dapple.laf.useScreenMenuBar=true"/>
126123
<argument value="foo=bar"/>

0 commit comments

Comments
 (0)