问题
I've read that there are only two steps needed to run Weka on linux, that is:
- Add weka directory to CLASSPATH
- 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?
回答1:
I was using oracle's jdk and running sudo apt-get install openjdk-7-jre
solved my problem.
来源:https://stackoverflow.com/questions/23277062/cant-run-weka-explorer-on-ubuntu-14-04