Skip to content

Added catch for HeadlessException and comprehensive error message#748

Open
mawenzy wants to merge 4 commits intotoolbox4minecraft:masterfrom
mawenzy:master
Open

Added catch for HeadlessException and comprehensive error message#748
mawenzy wants to merge 4 commits intotoolbox4minecraft:masterfrom
mawenzy:master

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