Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--headless displays splash screen when running from console/terminal. #1171

Open
lodici opened this issue Jul 6, 2017 · 4 comments
Open

Comments

@lodici
Copy link
Member

lodici commented Jul 6, 2017

A long time since I looked at the splash screen mechanism but I think MagicMain is linked to the mechanism for preloading the splash image via a setting in build.xml. The workaround is to add -splash:.

@melvinzhang
Copy link
Contributor

melvinzhang commented Aug 14, 2017

splash screen and --headless are separate things, they are not related. Splash screen is the image shown when the JVM loads the jar, it is a setting in the jar. It is loaded and shown without any code as long as the SplashScreen-Image is set in the jar file. --headless means run using a particular game controller that output on the command line instead of in the GUI.

@melvinzhang
Copy link
Contributor

@lodici is the issue starting many --headless instances and seeing multiple splash screen show up?

@melvinzhang melvinzhang reopened this Aug 14, 2017
@melvinzhang
Copy link
Contributor

melvinzhang commented Aug 14, 2017

If so, it seems that the only way around that is to use our own splashscreen instead of the default one. The default one is loaded and shown even before any code gets loaded, so it is not possible to disable it except with VM flags like the -splash:. or -Djava.awt.headless=true. See MovingBlocks/Terasology#1571 for a similar issue

@melvinzhang
Copy link
Contributor

Using our own SplashScreen seems to be a bit of an overkill, instead of requiring both -Djava.awt.headless=true and --headless what about removing --headless and automatically execute "headless" mode when -Djava.awt.headless=true is set. This can be detected in code via GraphicsEnvironment.isHeadless() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants