weka导入Eclipse


Since the  Subversion structure changed in early November 2008, the structure of the  weka-src.jar changed as well. This affects the nightly snapshots and versions later than 3.4.13 and 3.5.8.

The Example setup used in this HOWTO is for a Linux/Unix based operating system. If you are using Windows, you will have to adapt the paths accordingly (using backslashes instead forward slashes).

Requirements

  • ANT
  • Java 1.4 or later for Weka 3.4.x
  • Java 1.5 or later for Weka 3.5.x or later

up to 3.4.13 and 3.5.8

Extract the source code

  • Create a directory for the source code, e.g., the following:
    /tmp/weka
  • Extract the source code from the weka-src.jar with any archive manager that can handle the ZIP file format into the directory you just created (don't forget to re-recreate the folder structure when extracting).
  • change into the weka package and run the build.xml from command-line for creating all the necessary directories:
    ant exejar

Setup Eclipse

  • Start up Eclipse
  • Create a new Java project
    File -> New -> Project...

  • Eclipse-34x-wekasrcjar-New-JavaProject.png

  • Name the project Weka
  • check Create separate folders for source and class files and use the following folders:
    • Source folder name: <leave empty>
    • Output folder name: build/classes

  • Eclipse-34x-wekasrcjar-folders.png

  • check Create project from existing code and use the following path:
    /tmp/weka

  • Eclipse-34x-wekasrcjar-existingsource.png

  • Exclude the build and dist directories from the build path and make sure that the default output folder is the following directory (Weka is the project name):
    Weka/build/classes

  • Eclipse-34x-wekasrcjar-projectsettings.png

  • Click on Finish

newer than 3.4.13 and 3.5.8

Extract the source code

  • Create a directory for the source code, e.g., the following:
    /tmp/weka
  • Extract the source code from the weka-src.jar with any archive manager that can handle the ZIP file format into the directory you just created (don't forget to re-recreate the folder structure when extracting).
  • create a lib directory, if necessary (on the same level as src)
  • run the build.xml (above the src directory) from command-line for creating all the necessary directories:
    ant exejar

Setup Eclipse

  • Start up Eclipse
  • Create a new Java project
    File -> New -> Project...

  • Eclipse-34x-wekasrcjar2-New-JavaProject.png

  • Name the project Weka
  • check Create separate folders for source and class files and use the following folders:
    • Source folder name: src/main/java
    • Output folder name: build/classes

  • Eclipse-34x-wekasrcjar2-folders.png

  • check Create project from existing code and use the following path:
    /tmp/weka

  • Eclipse-34x-wekasrcjar2-existingsource.png

  • Exclude the src/test/java directory from the build path and make sure that the default output folder is the following directory (Weka is the project name):
    Weka/build/classes

  • Eclipse-34x-wekasrcjar2-projectsettings.png

  • Click on Finish
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值