Weka on a memory stick
The following guide explains how to put Weka on a USB memory stick. This works both for Linux and Windows (Mac OSX as well).
For simplicity, this example is demonstrated with the following versions:
- Weka: 3.5.3
- JRE: 1.5.0_10
Preliminaries#
- download a Weka ZIP (Windows: don't download the Installer!)
- download the JRE (Java Runtime Environemnt) that works with the downloaded Weka version. (Linux: don't download the RPM, but the Linux self-extracting file)
- install the downloaded JRE
- Windows:
the JRE location is normally in
C:\Program Files\Java
- Linux:
the self-extracting file creates a directory containing the JRE at the same location as the installation file
- Windows:
Setup#
- create a directory on your memory stick that will hold Weka and the JRE:
Script#
As a final step, create a script to start Weka:
-
Windows
- create a new batch file called
weka.bat
in the directoryweka
with the following content@echo off set CP=%CLASSPATH%;.\weka-3-5-3\weka.jar start .\jre1.5.0_10\bin\javaw -classpath "%CP%" weka.gui.GUIChooser
Note: If
start
is not available in your flavor of Windows, you can drop it. It is only used to get rid of the DOS-Box.
- create a new batch file called
-
Linux
- create a new bash script called
weka.sh
in the directoryweka
with the following content#!/bin/bash CP=$CLASSPATH:./weka-3-5-3/weka.jar ./jre1.5.0_10/bin/java -classpath $CP weka.gui.GUIChooser
Note: since memory sticks normally use the FAT32 file-system you probably won't need to make it executable
- create a new bash script called
Execution#
-
Windows:
just double-click on the batch file
-
Linux:
open a terminal and execute the bash script
Links#
- Weka homepage
- Sun Java homepage
- start command in Windows NT/2000