Setup of KaffePC

This page describe how to install and set up KaffePC.

1. Installation

1.1 Extraction of KaffePC archive file

Extract zip file on DOS partition.

On DOS, you can use unzip386.exe to extract.

1.2 Setting of environment variables

Set environment variables below. Assume that zip file is extracted to c:\kaffepc.
set PATH=c:\kaffepc\bin
set KAFFEHOME=c:/kaffepc
set CLASSPATH=<user-jar or user-zip files>
Note that environment variables KAFFEHOME and CLASSPATH use '/' as a separater. If you need, you can add zip/jar files to CLASSPATH.

Note: Since KaffePC 1.0 beta3, system classes (klasses.jar and kaffepc.jar) is automatically added at invoke system.

Furthermore, KaffePC/VM recognize all of files %KAFFEHOME%/lib/ext/*.jar and add these filese to CLASSPATH automatically. the order of addition to CLASSPATH is below.

  1. %KAFFEHOME%/lib/{klasses.jar,kaffepc.jar}
  2. %KAFFEHOME%/lib/ext/*.jar
  3. Contents of environment variable CLASSPATH

1.3 Invoke KaffePC

Type as below on DOS prompt.
C:\> kaffe <Class name have appropriate main method>
To invoke multiple class simultaneously, see KaffePC Launcher.

1.4 Setting of Japanese and timezone

To treate Japanese(Shift-JIS), set following environment variables.
set LANG=ja_JP.SJIS
And to set Japanese standard timezone, set following environment variables.
set TZ=JST-9

1.5 Setting of network

Because KaffePC recognize packet driver automatically, setting of the driver not required. Setting for IP address and hostname is to edit %KAFFEHOME%\lib\kp_net.pro. Items:
kaffepc.net.boot
Set true or false. In the case of true, KaffePC/VM get the information about TCP/IP from BOOT server of DHCP server and ignore tha information below.
kaffepc.net.my_ip
Set the IP addres.
kaffepc.net.netmask
Set the netmask.
kaffepc.net.nameserver.0 (primary) kaffepc.net.nameserver.1 (secondery)
Set the DNS server(s).
kaffepc.net.gateway
Set the gateway.
kaffepc.net.hostname
Set the hostname.
And the line have '#'(sharp) character beginning of it is recognized as the comment. Sample kp-net.pro:
kaffepc.net.boot=false
kaffepc.net.my_ip=192.168.0.10
kaffepc.net.netmask=255.255.255.0
kaffepc.net.nameserver.0=192.168.0.1
kaffepc.net.nameserver.1=192.168.0.2
kaffepc.net.gateway=192.168.0.1
kaffepc.net.hostname=venus

1.6 Setting of FPU emulator

In the case of use CPU that have no FPU such 386, 486SX. the setting of FPU emulator below is needed.
set 387=N
set emu387=c:/kaffepc/bin/emu387.dxe

2. KaffePC filesystem

KaffePC support FAT filesystem. KaffePC use '/'(slash) as a directory separater.

2.1 Translation of long filename

KaffePC provide the mechanism of the translation to long filename from real filename. In the case of a program access specified file, If the translate table file exist in the same directory, KaffePC translate file name corresponding with contents of the translate table file. The name of the translation table file is _kptrans.tbl. It has the following form.
<Name>=<Real Name>
...
where <Name> is the filen name used by program, <Real Name> is actually accessed file name. And the line have '#'(sharp) character beginning of it is recognized as the comment.

Sample _kptrans.tbl:

javax.comm.properties=jv-comm.pro
kaffepc.net.properties=kp-net.pro
In this situation, javax.comm.properties mapped jv-comm.pro and kaffepc.net.properties mapped kp-net.pro.

3. Utility of KaffePC

3.1 Ping command

usage:
c:\> ping <hostname>
If connection success, this command print to standard output:
<hostname> is alive.

3.2 KaffePC Launcher

KaffePC Launcher is a tool for achieve parallel invokation multiple applications.

usage:

c:\> launcher
KaffePC Launcher invoke KaffePC/VM with multiple java applications corresponding with contents of %KAFFEHOME%\lib\kp-lnchr.pro. The form of kp-lnchr.pro is described below.
kaffepc.launcher.class.<Application No>=<Main Class Name>
kaffepc.launcher.args.<Application No>=<Main Args>
...
where <Application No> is the application number starting 0, <Main Class Name> is the class name invoke, <Main Args> is arguments of it. And the line have '#'(sharp) character beginning of it is recognized as the comment.

Sample kp-lnchr.pro:

kaffepc.launcher.class.0=App1
kaffepc.launcher.args.0=param1 param2
kaffepc.launcher.class.1=App2
It is equivarent to execute parallel following commands.
c:\> kaffe App1 param1 param2
c:\> kaffe App2