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

GCViewer CLI doesn't work in headless mode #213

Open
ebourg opened this issue Nov 21, 2018 · 0 comments
Open

GCViewer CLI doesn't work in headless mode #213

ebourg opened this issue Nov 21, 2018 · 0 comments

Comments

@ebourg
Copy link

ebourg commented Nov 21, 2018

GCViewer doesn't work from the command line on a headless system (for example when connecting to a remote server with SSH). The following exception is thrown:

$ java -jar gcviewer-1.36-SNAPSHOT.jar gc.log summary.csv
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:208)
        at java.desktop/java.awt.Window.<init>(Window.java:548)
        at java.desktop/java.awt.Frame.<init>(Frame.java:423)
        at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
        at com.tagtraum.perf.gcviewer.view.GCViewerGui.<init>(GCViewerGui.java:29)
        at com.tagtraum.perf.gcviewer.ctrl.impl.GCViewerGuiController.startGui(GCViewerGuiController.java:115)
        at com.tagtraum.perf.gcviewer.GCViewer.doMain(GCViewer.java:83)
        at com.tagtraum.perf.gcviewer.GCViewer.main(GCViewer.java:43)

The command line code should be decoupled from the GUI.

It's possible to work around this issue with xvfb:

$ xvfb-run java -jar gcviewer-1.36-SNAPSHOT.jar gc.log summary.csv
@ebourg ebourg changed the title gcviewer CLI doesn't work in headless mode GCViewer CLI doesn't work in headless mode Nov 21, 2018
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

1 participant