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

Added catch for HeadlessException and comprehensive error message #748

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mawenzy
Copy link

@mawenzy mawenzy commented May 2, 2020

I'm using Fedora 31 and Java comes preinstalled with openjdk-headless, which allows me to run amidst, but it crashes when trying to create a JFrame with an HeadlessException.

I added an error message offering a probable solution, installing the not headless version.

@moulins
Copy link
Contributor

moulins commented May 2, 2020

The message is good, but I don't think the check belongs here.

A better way would be to check the GraphicsEnvironment.isHeadless() flag, just before the application starts (for example, in the Amidst.run() method).

I'll accept the PR if you make these changes :)

@mawenzy
Copy link
Author

mawenzy commented May 3, 2020

Makes sense, I have changed it.

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

Successfully merging this pull request may close these issues.

2 participants