Question

I've read that there are only two steps needed to run Weka on linux, that is:

  1. Add weka directory to CLASSPATH
  2. Run java -jar weka.jar

After running above command I'm getting:

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:218)
    at weka.gui.LogWindow.<init>(LogWindow.java:252)
    at weka.gui.GUIChooser.<clinit>(GUIChooser.java:215)

Does anyone have any clue what might be causing this?

Was it helpful?

Solution

I was using oracle's jdk and running sudo apt-get install openjdk-7-jre solved my problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top