[kaffe] kaffe classpath problem?

Dalibor Topic robilad at yahoo.com
Fri May 9 09:23:01 PDT 2003


Hi Peter,

--- Peter Wtorek <pwtorek at telenium.ca> wrote:
> Hello,
> 
>     Please pardon the newbie style question, but I cannot find an answer.
> 
>     I've installed the kaffe-1.0.6.tgz package on an OpenBSD 3.2 
> system.  The install went well once all the library dependencies were 
> installed (png/gif/X11/etc...)
> 
>     I can compile the basic HelloWorld application - but once I attempt 
> to compile classes that I've created among others, I get your typical 
> classpath errors.
> 
>     I have the CLASSPATH environment variable set to:
> 
>     
>
CLASSPATH=.:/usr/local/share/kaffe:/usr/local/share/kaffe/Klasses.jar:/usr/loca
>
l/share/kaffe/comm.jar:/usr/local/share/kaffe/pjava.jar:/usr/local/share/kaffe/
>
servlet.jar:/usr/local/share/kaffe/tools.jar:/usr/local/share/kaffe/microsoft.j
> ar:/usr/local/share/kaffe/kjc.jar:/usr/local/share/kaffe/rmi.jar
> 
>     So, basically all the .jars are included, and whatever classes I 
> have inside my current directory (helloworld).
> 
>     I also have both classes contained within the "helloworld" package.
> 
>     The code for HelloWorld.java is as follows:
> 
> package helloworld;
> 
> public class HelloWorld {
>         public void HelloWorld() {
>                 System.out.println ("Hello World!");
>         }
> }
> 
>     The code for HelloUniverse.java is as follows:
> 
> package helloworld;
> 
> public class HelloUniverse {
>         HelloWorld tempHelloWorld;
> 
>         public void HelloUniverse() {
>                 tempHelloWorld = new HelloWord ();
> 
>                 System.out.println ("Hello Universe!");
>         }
> 
>         public static void main (String[] args) {
>                 HelloUniverse tempHelloUniverse = new HelloUniverse ();
>         }
> }
> 
>     My make command is as follows, and the resulting errors:
> 
> $ make
> javac -classpath 
>
.:/usr/local/share/kaffe:/usr/local/share/kaffe/Klasses.jar:/usr/local/share/kaffe/comm.jar:/usr/local/share/kaffe/pjava.jar:/usr/local/share/kaffe/servlet.jar:/usr/local/share/kaffe/tools.jar:/usr/local/share/kaffe/microsoft.jar:/usr/local/share/kaffe/kjc.jar:/usr/local/share/kaffe/rmi.jar
> 
> HelloWorld.java
> javac -classpath 
>
.:/usr/local/share/kaffe:/usr/local/share/kaffe/Klasses.jar:/usr/local/share/kaffe/comm.jar:/usr/local/share/kaffe/pjava.jar:/usr/local/share/kaffe/servlet.jar:/usr/local/share/kaffe/tools.jar:/usr/local/share/kaffe/microsoft.jar:/usr/local/share/kaffe/kjc.jar:/usr/local/share/kaffe/rmi.jar
> 
> HelloUniverse.java
> HelloUniverse.java:4: error:Cannot find class "HelloWorld" [JLS 8]
> *** Error code 1
> 
>     Any help???

As far as I remember, you had to make sure that Klasses.jar is the first item
on the CLASSPATH in 1.0.6. In your case, the first item on the classpath is .,
and that's probably confusing kaffe ...

Current CVS sources don't have that problem anymore. But you'll have to tweak
libtool a little to get them to build on OpenBSD. See
http://www.kaffe.org/pipermail/kaffe/2002-August/008823.html .

cheers,
dalibor topic

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




More information about the kaffe mailing list