[Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]]

me me2fast at usa.net
Thu Nov 4 19:06:21 PST 1999


Kit <ktm at gims.net> wrote:
> 
> On Wed, 03 Nov 1999, me wrote:
> > 
> > Ok, even after doing that, and copying the JARs to
/usr/local/share/kaffe:
> > 
> > -rw-r--r--   1 root     root       885137 Oct 28 01:09 Klasses.jar
> > -rw-r--r--   1 root     ftp        140032 Nov  3 13:54 beaninfo.jar
> > -rw-r--r--   1 root     root      8828109 May 10 06:07 classes.zip
> > -rw-r--r--   1 root     root         8081 Oct 28 01:09 comm.jar
> > -rw-r--r--   1 root     root       557705 Oct 28 01:09 kjc.jar
> > -rw-r--r--   1 root     ftp        112735 Nov  3 13:54 mac.jar
> > -rw-r--r--   1 root     root         3100 Oct 28 01:09 microsoft.jar
> > -rw-r--r--   1 root     ftp        173690 Nov  3 13:54 motif.jar
> > -rw-r--r--   1 root     ftp         42237 Nov  3 13:54 multi.jar
> > -rw-r--r--   1 root     root         5486 Oct 28 01:09 pjava.jar
> > -rw-r--r--   1 root     root        81376 Oct 28 01:09 rmi.jar
> > -rw-r--r--   1 root     root        11983 Oct 28 01:09 servlet.jar
> > -rw-r--r--   1 root     ftp       1897143 Nov  3 13:54 swing.jar
> > -rw-r--r--   1 root     ftp       2420388 Nov  3 13:54 swingall.jar
> > -rw-r--r--   1 root     root        17976 Oct 28 01:09 tools.jar
> > -rw-r--r--   1 root     ftp         94143 Nov  3 13:54 windows.jar
> > 
> > I'm still encountering the same error:
> > 
> > javac ApptoAppl.java
> > ApptoAppl.java:11: Can''t find class "JLabel" §8
> > 
> > Moreover, I've encountered similar errors with the examples that are
available
> > in the Swing 1.1.1 package:
> > 
> > javac SwingApplet.java
> > SwingApplet.java:40: Can''t find class "JApplet" §8
> > 
> > 
> > What's going on here?  So far I've gained 0 productivity from Kaffe,
inspite
> > of being due diligent with the documentation, email archives, etc.
> > 
> > What am I missing ???
> 
> hmmphmumblegrumblehnnnnnaaaaauuuuggggghhhhh!
> <ahem>
> 
> perhaps you should re-read the documentation wrt the javac command line
options.
> pay close attention to the '-classpath' argument.
> 
> you need 'swingall.jar' to be in your classpath if you are to compile swing
> code.

Great, the documentation is not apparent about explicitly specifying *every*
.JAR that's needed.  Perhaps this is asking way too much, but why can't a
directory(s) be specified which can then be parsed for the referenced .JARs ? 
Hasn't this been the case with the C/C++ compilers for specifying INCLUDES &
LIBS ??

But I'm willing to learn, so I'll accept the answer and move on.  All I want
right now is to be productive with JAVA, and not get bogged down with details
related to the tools.

> 
> what the heck were using before kaffe?
> 

I used Symantec Cafe over a year ago, but I would now like to focus on
learning & deploying on Linux.  Since I now have your attention, here are 2
more questions:

Question 1
----------
appletviewer ApptoAppl.html

java.lang.NoClassDefFoundError: javax/swing/JLabel
	at kaffe.applet.AppletViewer.main(AppletViewer.java:418)

Do I need an explicit CODEBASE parameter in the HTML file that points to
/usr/local/share/kaffe ?

Question 2
----------
javac -version -classpath
.:/usr/local/share/kaffe/swingall.jar:/usr/local/share/kaffe/kjc.jar:/usr/local/share/kaffe/tools.jar:/usr/local/share/kaffe/Klasses.jar
SwingUI.class

KOPI Java Compiler Version: 1.3C

javac  -classpath
.:/usr/local/share/kaffe/swingall.jar:/usr/local/share/kaffe/kjc.jar:/usr/local/share/kaffe/tools.jar:/usr/local/share/kaffe/Klasses.jar
SwingUI.class

java.lang.NoClassDefFoundError: antlr/collections/AST
	at at.dms.kjc.Main.beautifyParseError(Main.java:692)
	at at.dms.kjc.Main.parseFile(Main.java:488)
	at at.dms.kjc.Main.run(Main.java:119)
	at at.dms.kjc.Main.compile(Main.java:449)
	at at.dms.kjc.Main.main(Main.java:432)

What am I missing here ??

Thanks,

me2fast at usa.net



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1


More information about the kaffe mailing list