Я скачал и распаковал следующую версию WEKA weka-3-4-19.Это на операционной системе Linux.Я хочу использовать WEKA через командную строку, однако при выполнении
java weka.classifiers.tress.j48.J48
я получаю следующее сообщение об ошибке:
Exception in thread "main" java.lang.NoClassDefFoundError: weka/classifiers/tress/j48/J48
Caused by: java.lang.ClassNotFoundException: weka.classifiers.tress.j48.J48
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: weka.classifiers.tress.j48.J48. Program will exit.
Может кто-нибудь помочь мне решить эту проблему?Спасибо.
Edit1:
При попытке выполнить команду java -jar weka.jar
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:432)
at java.awt.Frame.<init>(Frame.java:403)
at javax.swing.JFrame.<init>(JFrame.java:202)
at weka.gui.GUIChooser.<init>(GUIChooser.java:98)
at weka.gui.GUIChooser.main(GUIChooser.java:285)
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
Редактировать 2:
При попытке java.weka.classifiers.trees.J48
Exception in thread "main" java.lang.NoClassDefFoundError: weka/classifiers/tress/J48
Caused by: java.lang.ClassNotFoundException: weka.classifiers.tress.J48
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: weka.classifiers.tress.J48. Program will exit.
Редактировать 3:
{cslinux2:~/weka-3-4-19} echo $CLASSPATH
/people/cs/j/jld082000/weka-3-4-19/weka.jar:
{cslinux2:~/weka-3-4-19} java weka.classifiers.trees.J48
Weka exception: No training file and no object input file given.
General options:
-t <name of training file>
Sets training file.
-T <name of test file>
Sets test file. If missing, a cross-validation will be performed on the training data.