diff --git a/README.md b/README.md index fdb06fe..bb18098 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Modifications ----- * **version 2.4.0** (2015-05-15) + * Added optional `useJavaXKey` attribute to JarBundler task (for [universalJavaApplicationStub](https://github.com/tofi86/universalJavaApplicationStub)-Support) * Added optional `hiResCapable` attribute to JarBundler task (for Plist key `NSHighResolutionCapable`) * removed deprecated `aboutmenuname` attribute * removed deprecated `infostring` and `shortinfostring` attributes (use `copyright` attribute instead) diff --git a/dox/index.html b/dox/index.html index 70e9158..3ca5524 100644 --- a/dox/index.html +++ b/dox/index.html @@ -37,9 +37,10 @@

Version 2.4.0

What's New, May 2015

@@ -404,7 +405,17 @@

Task Attributes, optional

- + + useJavaXKey + If true, the Plist dictionary key for Java options will be named JavaX instead of Java.
+ This feature was added for a better support of the alternative JavaApplication Stub "universalJavaApplicationStub" + which aims to support a variety of Java versions and beeing compatible with Apple AND Oracle Java.
However, starting with Mac OS X 10.10, Apple is forcing to download the old Apple JRE 6 + for all applications with a Java Plist dictionary key, regardless whether jvmversion says e.g. 1.6+ +
+ Default: false +
+ + verbose @@ -785,9 +796,10 @@

History

Released: May 2015 (version 2.4.0)

Released: Apr 2014 (version 2.3.0)

diff --git a/src/net/sourceforge/jarbundler/AppBundleProperties.java b/src/net/sourceforge/jarbundler/AppBundleProperties.java index d90440b..44ad2b7 100644 --- a/src/net/sourceforge/jarbundler/AppBundleProperties.java +++ b/src/net/sourceforge/jarbundler/AppBundleProperties.java @@ -66,6 +66,9 @@ public class AppBundleProperties { // HiRes capability, optional private boolean mNSHighResolutionCapable = false; + // Support for JavaX key, optional + private boolean mJavaXKey = false; + // Explicit default: JavaApplicationStub private String mCFBundleExecutable = "JavaApplicationStub"; @@ -284,6 +287,14 @@ public boolean getNSHighResolutionCapable() { return mNSHighResolutionCapable; } + public void setJavaXKey(boolean b) { + mJavaXKey = b; + } + + public boolean getJavaXKey() { + return mJavaXKey; + } + public void setCFBundleExecutable(String s) { mCFBundleExecutable = s; } diff --git a/src/net/sourceforge/jarbundler/JarBundler.java b/src/net/sourceforge/jarbundler/JarBundler.java index 3d7b655..9677f2b 100644 --- a/src/net/sourceforge/jarbundler/JarBundler.java +++ b/src/net/sourceforge/jarbundler/JarBundler.java @@ -452,6 +452,13 @@ public void setHiResCapable(boolean b) { bundleProperties.setNSHighResolutionCapable(b); } + /** Tobias Fischer, v2.4.0 + * Setter for the alternative 'JavaX' dictionary key + */ + public void setUseJavaXKey(boolean b) { + bundleProperties.setJavaXKey(b); + } + /** * Setter for the "smalltabs" attribute (optional) */ diff --git a/src/net/sourceforge/jarbundler/PropertyListWriter.java b/src/net/sourceforge/jarbundler/PropertyListWriter.java index 1333872..4807bb0 100644 --- a/src/net/sourceforge/jarbundler/PropertyListWriter.java +++ b/src/net/sourceforge/jarbundler/PropertyListWriter.java @@ -225,8 +225,8 @@ private void buildDOM() { if (documentTypes.size() > 0) writeDocumentTypes(documentTypes, dict); - // Java entry in the plist dictionary - writeKey("Java", dict); + // Java / JavaX entry in the plist dictionary + writeKey(bundleProperties.getJavaXKey() ? "JavaX" : "Java", dict); Node javaDict = createNode("dict", dict); // Main class, required