Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]
"Peter C. Mehlitz" [EMAIL PROTECTED] wrote: Still no luck! I've downloaded the following classes.zip: 11550429 May 11 12:26 jdk_1.1.7-v3-glibc-x86.tar.gz There's no swing in jdk 1.1.x, you should get the swing-1.1.1fcs package from JavaSofts website. 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 ftp140032 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 ftp112735 Nov 3 13:54 mac.jar -rw-r--r-- 1 root root 3100 Oct 28 01:09 microsoft.jar -rw-r--r-- 1 root ftp173690 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 root81376 Oct 28 01:09 rmi.jar -rw-r--r-- 1 root root11983 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 root17976 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 Furthermore, when I try to list the contents of a .JAR file, I encounter other errors: jar tvf /usr/local/share/kaffe/Klasses.jar 1457 Thu Jan 01 0-8:00:00 PST 1970 java/lang/Object.class java.io.IOException: LOC header signature bad: 535b547d at java.lang.Throwable.init(Throwable.java:38) at java.lang.Exception.init(Exception.java:24) at java.io.IOException.init(IOException.java:25) at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:55) at kaffe.tools.jar.Jar.listFilesInJar(Jar.java:601) at kaffe.tools.jar.Jar.processJar(Jar.java:402) at kaffe.tools.jar.Jar.start(Jar.java:60) at kaffe.tools.jar.Jar.main(Jar.java:39) 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 ??? Thanks, [EMAIL PROTECTED] -- Peter C. Mehlitz Tel: +1 510 704 1527 Transvirtual Technologies, Inc., Fax: +1 510 704 1893 Berkeley, CA, USA.Email: [EMAIL PROTECTED] Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]
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 ftp140032 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 ftp112735 Nov 3 13:54 mac.jar -rw-r--r-- 1 root root 3100 Oct 28 01:09 microsoft.jar -rw-r--r-- 1 root ftp173690 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 root81376 Oct 28 01:09 rmi.jar -rw-r--r-- 1 root root11983 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 root17976 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 ??? hmmphmumblegrumblehnagh! 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. what the heck were using before kaffe? TTFN. Kit
Re: [Re: Errors encountered in compiling Java Tutorial example]
"Peter C. Mehlitz" [EMAIL PROTECTED] wrote: ..ApptoAppl.java:11: class JLabel not found in class ApptoAppl.. Do you have the (JavaSoft) swing classes installed? They are not part of our Klasses.jar (but we can run them). -- Peter C. Mehlitz Tel: +1 510 704 1527 Transvirtual Technologies, Inc., Fax: +1 510 704 1893 Berkeley, CA, USA.Email: [EMAIL PROTECTED] Still no luck! I've downloaded the following classes.zip: 8828109 May 10 06:07 /usr/local/share/kaffe/classes.zip from: 11550429 May 11 12:26 jdk_1.1.7-v3-glibc-x86.tar.gz And here's the same problem with the latest Kaffe: javac -verbose ApptoAppl.java [ START COMPILATION IN VERBOSE MODE ] [ 1307ms TO PARSE ApptoAppl.java ] [678ms TO CHECK INTERFACE OF ] ApptoAppl.java:11: Can''t find class "JLabel" §8 [250ms TO CHECK BODY OF ApptoAppl.java ] javac -version KOPI Java Compiler Version: 1.3C What am I missing? It's got to be a trivial config. problem !! Thanks for any help, [EMAIL PROTECTED] Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: [Re: Errors encountered in compiling Java Tutorial example]
Still no luck! I've downloaded the following classes.zip: 11550429 May 11 12:26 jdk_1.1.7-v3-glibc-x86.tar.gz There's no swing in jdk 1.1.x, you should get the swing-1.1.1fcs package from JavaSofts website. -- Peter C. Mehlitz Tel: +1 510 704 1527 Transvirtual Technologies, Inc., Fax: +1 510 704 1893 Berkeley, CA, USA.Email:[EMAIL PROTECTED]
Re: Errors encountered in compiling Java Tutorial example
me writes: This is probably a newbie issue, but since I cannot find any specific answers in any of the documentation, here goes... I've encountered some compile time errors when trying to build an example from the Java Tutorial available from Sun's website. The following verbose listing details my platform, the source code, the compiler errors, and my Shared Library configuration (i.e. glibc on Redhat Linux v6.0). Do I need to modify the code in order to please Pizza? Am I missing a Pizza switch (I used 'javac -version -verbose ApptoAppl.java') ?? You should upgrade to kaffe-1.0.5, which includes kjc instead of pizza. Also, you could install jikes on your machine, which is even better and faster. -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
Re: [Re: [Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]]]
me wrote: java -classpath /usr/local/share/kaffe/Klasses.jar:/usr/local/share/kaffe/kjc.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/rmi.jar:/usr/local/share/kaffe/swing.jar:/usr/local/share/kaffe/swingall.jar:/usr/local/share/kaffe/beaninfo.jar:/usr/local/share/kaffe/mac.jar:/usr/local/share/kaffe/motif.jar:/usr/local/share/kaffe/multi.jar:/usr/local/share/kaffe/windows.jar SwingUI.class ./myrun.csh java.lang.NoClassDefFoundError: SwingUI/class at java.lang.Throwable.init(Throwable.java:38) at java.lang.Error.init(Error.java:21) at java.lang.LinkageError.init(LinkageError.java:21) at java.lang.NoClassDefFoundError.init(NoClassDefFoundError.java:21) You should remove the .class extension. -- Edouard G. Parmelan Ingenieur Developpeur Quadratec - Parc Club "Orsay Universite" - 14/16,rue Jean Rostand 91893 Orsay Cedex - FRANCE Phone (+33)1 69 33 20 80 Email: [EMAIL PROTECTED] http://membres.tripod.fr/egp
Re: [Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]]
me writes: 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 ?? This is easy to do with kaffe using the .kafferc feature (see man page). Here's mine, for example: #!/bin/sh # Add installed *.zip and *.jar to CLASSPATH AUTOZIPJAR=`find ${KAFFE_CLASSDIR} \( -name '*.jar' -o -name '*.zip' \) -a \! -name Klasses.jar -a \! -name pizza.jar -a \! -name classes.zip | awk '{ printf ":%s", $1 }'` CLASSPATH="${CLASSPATH}${AUTOZIPJAR}" -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
Re: [Re: [Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]]]
Archie Cobbs [EMAIL PROTECTED] wrote: me writes: 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 ?? This is easy to do with kaffe using the .kafferc feature (see man page). Here's mine, for example: #!/bin/sh # Add installed *.zip and *.jar to CLASSPATH AUTOZIPJAR=`find ${KAFFE_CLASSDIR} \( -name '*.jar' -o -name '*.zip' \) -a \! -name Klasses.jar -a \! -name pizza.jar -a \! -name classes.zip | awk '{ printf ":%s", $1 }'` CLASSPATH="${CLASSPATH}${AUTOZIPJAR}" -Archie That's cool, but I have the same problem even with a fully qualified -classpath: cat myrun.csh #!/bin/csh java -classpath /usr/local/share/kaffe/Klasses.jar:/usr/local/share/kaffe/kjc.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/rmi.jar:/usr/local/share/kaffe/swing.jar:/usr/local/share/kaffe/swingall.jar:/usr/local/share/kaffe/beaninfo.jar:/usr/local/share/kaffe/mac.jar:/usr/local/share/kaffe/motif.jar:/usr/local/share/kaffe/multi.jar:/usr/local/share/kaffe/windows.jar SwingUI.class ./myrun.csh java.lang.NoClassDefFoundError: SwingUI/class at java.lang.Throwable.init(Throwable.java:38) at java.lang.Error.init(Error.java:21) at java.lang.LinkageError.init(LinkageError.java:21) at java.lang.NoClassDefFoundError.init(NoClassDefFoundError.java:21) BTW, since I upgraded to v1.0.5, I'm assuming that the Make does the updates to the man pages too. But all I have for a Kaffe man page is the one for 'kaffe', that's it! It has a passing mention of 'kafferc' but no details. Is this complete ?? Thanks, [EMAIL PROTECTED] Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: [Re: [Re: [Re: [Re: Errors encountered in compiling Java Tutorial example]]]]
me writes: #!/bin/csh java -classpath /usr/local/share/kaffe/Klasses.jar:/usr/local/share/kaffe/kjc.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/rmi.jar:/usr/local/share/kaffe/swing.jar:/usr/local/share/kaffe/swingall.jar:/usr/local/share/kaffe/beaninfo.jar:/usr/local/share/kaffe/mac.jar:/usr/local/share/kaffe/motif.jar:/usr/local/share/kaffe/multi.jar:/usr/local/share/kaffe/windows.jar SwingUI.class ./myrun.csh java.lang.NoClassDefFoundError: SwingUI/class at java.lang.Throwable.init(Throwable.java:38) at java.lang.Error.init(Error.java:21) at java.lang.LinkageError.init(LinkageError.java:21) at java.lang.NoClassDefFoundError.init(NoClassDefFoundError.java:21) There may be some hard coded buffer limitation to CLASSPATH. Try removing some of the unused JAR files in there.. ? BTW, since I upgraded to v1.0.5, I'm assuming that the Make does the updates to the man pages too. But all I have for a Kaffe man page is the one for 'kaffe', that's it! It has a passing mention of 'kafferc' but no details. Is this complete ?? It's as complete as it is.. patches welcom :-) -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com