Minggu, 06 November 2011

PERCOBAAN


Unix/Linux

I assume, that the mysql jar is located in the following directory:
  • /home/johndoe/jars/
Open a shell and execute the following command, depending on the shell you're using:
  • bash
    export CLASSPATH=$CLASSPATH:/home/johndoe/jars/mysql-connector-java-3.1.8-bin.jar
  • c shell
    setenv CLASSPATH $CLASSPATH:/home/johndoe/jars/mysql-connector-java-3.1.8-bin.jar

Unix/Linux uses the colon : as path separator, in contrast to Win32, which uses the semicolon ;.

Note: the prefixing with $CLASSPATH adds the mysql jar at the end of the currently existing CLASSPATH.

Scripts

This is a little start script for Weka Explorer, which can be adjusted easily. It also loads a mysql-connector:
#! /bin/bash
# Path to weka
WEKA_PATH=~/weka/
# add mysql-connector (manually copied to weka path) and weka to classpath
CP="$CLASSPATH:/usr/share/java/:$WEKA_PATH/mysql-connector-java-5.0.5-bin.jar:$WEKA_PATH/weka.jar"
# use the connector of debian package libmysql-java
# CP="$CLASSPATH:/usr/share/java/:$WEKA_PATH/weka.jar"
echo "used CLASSPATH: $CP"
# start Explorer
java -cp $CP -Xmx500m weka.gui.explorer.Explorer


Cygwin

The process is like with Unix/Linux systems, but since the host system is Win32 and therefore the Java installation also a Win32 application, you'll have to use the semicolon ; as separator for several jars.

RunWeka.bat

See the detailed Notes on Windows for different versions of Weka in the Invocation section of the Java Virtual Machine article.

Tidak ada komentar:

Posting Komentar