FULL PRODUCT VERSION :
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
EXTRA RELEVANT SYSTEM CONFIGURATION :
MacBook Pro Retina, Mid 2012
A DESCRIPTION OF THE PROBLEM :
The "-splash" option should display the splash image even if the "-XstartOnFirstThread" option is given.
It works on Java 6, but the splash image is not displayed when using Java 7 or Java 8.
REGRESSION. Last worked in version 6u45
ADDITIONAL REGRESSION INFORMATION:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* Get an image, for example
curl http://jruby.org/images/jruby-logo.png > jruby-logo.png
* Compile Main.java
public class Main {
public static void main(String[] args) {
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
System.out.println("Interrupted!");
}
System.out.println("Hello World");
}
}
* Start the program with the splash image
java -splash:jruby-logo.png -XstartOnFirstThread Main
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The program should start by displaying the splash image and then print "Hello World".
ACTUAL -
The splash image is NOT displayed. "Hello World" is displayed.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message is given.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
curl http://jruby.org/images/jruby-logo.png > jruby-logo.png
public class Main {
public static void main(String[] args) {
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
System.out.println("Interrupted!");
}
System.out.println("Hello World");
}
}
java -splash:jruby-logo.png -XstartOnFirstThread Main
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
There is no known workaround for this. You can either display a splash image OR use the -XstartOnFirstThread option to enable Eclispe SWT or other libraries that require you to run on the main thread.