Things look well as I launch the application and it downloads updates during the splash screen, but then when JavaAppLauncher launches my application in a new JVM and exits the Dock switches from showing my bundled app to showing the Java coffee cup and if I try to Keep in Dock then the icon switches to a terminal exec window and clicking it launches the java command in a new terminal.
I think we've used:-Xdock:name=<application name>"override default application name displayed in dock-Xdock:icon=<path to icon file>override default icon displayed in dockin the past to make this work. These would be in your getdown.txt.
But -Ddirect=true should also solve these problems, so I'm not sure why you're running into trouble there. That should work.
I made a simple test app that runs a JavaFX app, and tried that with -Ddirect=true and it pretty much works (I had to fix some bugs, but none that should have been causing the problem you had).In any case, maybe give that test app a whirl and see if that works for you and if it sheds any light on the errors you're seeing with -Ddirect=true:
[WARNING] The POM for com.threerings:getdown:jar:1.6-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.382 s
[INFO] Finished at: 2016-01-12T14:26:16-07:00
[INFO] Final Memory: 12M/115M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project testapp: Could not resolve dependencies for project com.threerings.testapp:testapp:jar:1.0-SNAPSHOT: Could not find artifact com.threerings:getdown:jar:1.6-SNAPSHOT -> [Help 1]
After looking around trying to sort that out on a whim and using targets I had read about I cloned getdown and did mvn install from there then returned back and the mvn project target worked. Executing the java -jar command worked:
java -jar target/testapp/getdown-new.jar target/testapp
Running this I see the default java icon from the java command, then I see the icon and such from Getdown Test App and then the Java icon disappears. This is similar to, yet in reverse order of, what I see with my JavaAppLauncher based program and the reasons for that make sense to me. As you say if I worked on setting the dock name and icon it would be less noticeable when my app runs. (Except, I think, for the case where the app is kept on the dock.)
Then I launched again with the direct flag.
java -Ddirect=true -jar target/testapp/getdown-new.jar target/testapp
Again I see the Getdown Test App and no crash so I should study the code and see what I missed that causes mine to crash. The Getdown splash screen does not go away though. It's been sitting at 99% complete with "Launching ..." animation the whole time I've been composing this message. Does that happen for you?
Thank you again for your input and the test program to review,
--
Jacob
Again I see the Getdown Test App and no crash so I should study the code and see what I missed that causes mine to crash. The Getdown splash screen does not go away though. It's been sitting at 99% complete with "Launching ..." animation the whole time I've been composing this message. Does that happen for you?