问题
I am a student at a local university in Atlanta , Georgia. I am looking for incorporating Weka.jar file to my eclipse for my class project.
I have tried many time to incorporate the weka-3.4.jar file into our java build path in java project using Eclipse.
Each time, my program gave me an error saying that weka.core could not be resolved from my import statement in my java test program.
It seems very obvious that i did missed something very important but i could not figure it out.
If you know what 's happening, i would like to seek your help, please tell me what to do in order to fix this error message.
回答1:
You can get weka jar file from the weka file just go in program file => weka folder => there are 3 jar files. So you can add to your eclipse. Then, go to your eclipse project then build path and add in libraries there, it works!
回答2:
Do you compile and run your program using Eclipse ("Run") or do you use the command line? If you use Eclipse to run your program you should add the jar file in your project properties under "Java Build Path" > "Libraries" > "Add external JARs...". When using the command line, use the -jar parameter, e.g., java -jar path_to_file/weka-3.4.jar yourprogram
来源:https://stackoverflow.com/questions/8042315/import-weka-jar-file