weka导入Eclipse

Table of Contents

Requirements
up to 3.4.13 and 3.5.8
Extract the source code
Setup Eclipse
newer than 3.4.13 and 3.5.8
Extract the source code
Setup Eclipse
Links

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...


  • 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

  • weka导入Eclipse_第1张图片

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


  • 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

  • weka导入Eclipse_第2张图片

  • 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...


  • 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

  • weka导入Eclipse_第3张图片

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


  • 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

  • weka导入Eclipse_第4张图片

  • Click on Finish

你可能感兴趣的:(weka导入Eclipse)