Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- //Code that throws headless exception
- } catch (HeadlessException e) {
- printStacktrace(); //basically do nothing
- }
- if (! java.awt.GraphicsEnvironment.isHeadless()) {
- // code that throws headless exception
- } else {
- log.info("Skipping GUI portion")
- }
Add Comment
Please, Sign In to add comment