Before you start, download the latest stable version of Weka (Weka 3.8 at the time of writing) from http://www.cs.waikato.ac.nz/ml/weka/downloading.html.
There are multiple download options available. You'll want to use Weka as a library in your source code, so make sure that you skip the self-extracting executables and download the ZIP archive, as shown in the following screenshot. Unzip the archive and locate weka.jar within the extracted archive:
![](https://static.packt-cdn.com/products/9781788474399/graphics/assets/7db1f2c9-1619-4251-9a3b-ef6a59eb9538.png)
We'll use the Eclipse IDE to show examples; follow these steps:
- Start a new Java project.
- Right-click on the project properties, select Java Build Path, click on the Libraries tab, and select Add External JARs.
- Navigate to extract the Weka archive and select the weka.jar file.
That's it; we are ready to implement the basic machine learning techniques!