-
Notifications
You must be signed in to change notification settings - Fork 161
Feature request to suppress -splash option if no splash image is provided #94
Description
I'm submitting a…
- bug report
- feature request
- other
Short description of the issue/suggestion:
I am using universalJavaApplicationStub to build and run my application under Mac OS X. This works great, thank you for an awesome software.
I have been running into an issue that seems to be a Java FX bug. It looks like using the Mac OS X system menu in Java FX togehter with -splash option on start of Java VM does not work. You can find a longer description of my problem here.
Steps to reproduce the issue/enhancement:
Create a simple Java FX application with menu bar, set useSystemMenuBar to true and start the application using universalJavaApplicationStub. The SystemMenuBar is not used and supported (as of -splash option used by universalJavaApplicationStub script).
You can find my example code and detailed explanations here.
What is the expected behavior?
When no splash image is provided it would be nice if the -splash option could be suppressed.
What is the current behavior?
The -splash option is always used.
Do you have screenshots, GIFs, demos or samples which demonstrate the problem or enhancement?
See the stackoverflow description and screenshots.
What is the motivation / use case for changing the behavior?
It would be nice to have a workaround for the Java FX bug in case when no splash screen is used.
Please tell us about your environment:
- universalJavaApplicationStub version: 3.0.6
- Mac OS version: OS X El Capitan (10.11.6)
- Java version(s): openjdk version "15" 2020-09-15
OpenJDK Runtime Environment AdoptOpenJDK (build 15+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15+36, mixed mode, sharing)
Other information (e.g. related issues, suggestions how to fix, links for us to have context)
Suppressing the splash option might be done somehow like this:
# create splash option if splash image is available
if [[ -n $JVMSplashFile ]]
then
splashOption="-splash:\"${ResourcesFolder}/${JVMSplashFile}\""
else
splashOption=
fiand
exec "${JAVACMD}" \
-cp "${JVMClassPath}" \
${splashOption} \
-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}" \
-Xdock:name="${CFBundleName}" \
${JVMOptionsArr:+"${JVMOptionsArr[@]}" }\
${JVMDefaultOptions:+$JVMDefaultOptions }\
"${JVMMainClass}"\
${MainArgsArr:+ "${MainArgsArr[@]}"}\
${ArgsPassthru:+ "${ArgsPassthru[@]}"}I know the handling of quotes must be reviewed and corrected in order to handle spaces in splash image file name. But to be honest I am not an expert.
And finally, this is my Info.plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>JPrefs 0.2</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>universalJavaApplicationStub</string>
<key>CFBundleIconFile</key>
<string>JPrefs.icns</string>
<key>CFBundleIdentifier</key>
<string>de.softquadrat.jprefs.JPrefs</string>
<key>CFBundleDisplayName</key>
<string>JPrefs</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>JPrefs</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.2</string>
<key>NSHumanReadableCopyright</key>
<string>SoftQuadrat GmbH</string>
<key>NSHighResolutionCapable</key>
<true />
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true />
<key>AdministratorRequired</key>
<false />
<key>JavaX</key>
<dict>
<key>MainClass</key>
<string>de.softquadrat.jprefs.JPrefs</string>
<key>ClassPath</key>
<array>
<string>Java/JPrefs-0.2-runnable.jar</string>
</array>
<key>WorkingDirectory</key>
<string>$APP_PACKAGE/Contents/Resources</string>
</dict>
<key>LSEnvironment</key>
<dict>
<key>JAVA_HOME</key>
<string>Contents/PlugIns/jre/Contents/Home</string>
</dict>
<key>NSAppleEventsUsageDescription</key>
<string>There was an error while launching the application. Please
click OK to display a dialog with more information or cancel and view
the syslog for details.</string>
</dict>
</plist>