Weka+on+a+memory+stick

toc

In the following a little HOWTO for putting Weka on a USB memory stick. This is rather handy if someone needs to give a presentation but doesn't want to lug her/his laptop along. 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
 * Linux: the self-extracting file creates a directory containing the JRE at the same location as the installation file

= Setup = code format="text" weka code code format="text" weka-3-5-3 code code format="text" jre1.5.0_10 code
 * create a directory on your memory stick that will hold Weka and the JRE:
 * unzip the Weka ZIP into the //weka// directory, which will create the following sub-directory;
 * copy the JRE onto the stick in the //weka// directory, which will be this sub-directory:

= Script = As a final step, create a script to start Weka code format="winbatch" @echo off set CP=%CLASSPATH%;.\weka-3-5-3\weka.jar start .\jre1.5.0_10\bin\javaw -classpath "%CP%" weka.gui.GUIChooser code > **Note:** If  is not available in your flavor of Windows, you can drop it. It is only used to get rid of the DOS-Box. code format="bash" CP=$CLASSPATH:./weka-3-5-3/weka.jar ./jre1.5.0_10/bin/java -classpath $CP weka.gui.GUIChooser code > **Note:** since memory sticks normally use the [|FAT32] file-system you probably won't need to make it executable
 * Windows
 * create a new batch file called in the directory  with the following content
 * Linux
 * create a new bash script called in the directory  with the following content
 * 1) !/bin/bash

= 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