[kaffe] argh

Dalibor Topic robilad@kaffe.org
Sun Jan 4 07:37:02 2004


Hi,

have a happy new year!

M.D. DeWar wrote:
> I d/l the 1.1.2 version and still can't get anything that is java to run.
> ./java /temp/iperf-1.1.1/jperf.jar
> java.lang.ClassNotFoundException: /temp/iperf-1.1.1/jperf.jar
>    at kaffe.lang.AppClassLoader.findClass (AppClassLoader.java:296)
>    at java.lang.ClassLoader.loadClass (ClassLoader.java:142)

You can't do that ;)

A JAR file is like a zip file. Some JAR files contain an extra document 
saying which class is the main class, i.e. which one is supposed to be 
run. Those you can run with

kaffe -jar somefile.jar

if that doesn't work, chances are the documentation of the software 
you're trying to run contains a description how to adapt the CLASSPATH 
(java's equivalent of LD_LIBRARY_PATH, if you're familiar with Linux) 
for it to find the classes to run, and what class is the main class.

> spiderman# /usr/local/kaffe/bin/java jperf
> ava.lang.ClassNotFoundException: jperf
>    at kaffe.lang.AppClassLoader.findClass (AppClassLoader.java:296)
>    at java.lang.ClassLoader.loadClass (ClassLoader.java:142)

Just put the class file jperf in your CLASSPATH.

cheers,
dalibor topic