Can't run Weka explorer on Ubuntu 14.04

梦想的初衷 提交于 2019-12-12 13:01:56

问题


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?


回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!