>-----Original Message----- >From: Lapo Luchini [mailto:[EMAIL PROTECTED]] >Sent: 06 January 2003 11:11 >To: [EMAIL PROTECTED] >Subject: Re: Java (1 of 3): Gcj - Hello world exe (again) > > >Bruce Adams wrote: > >>Hello.java (note: case is important in this filename) >>========== >> >>class Hello { >> public Hello() {}; >> >> public static void main(String args[]) { >> int returnCode = 0; >> System.out.println("hello world\r\n"); >> System.exit(returnCode); >> } >>} >> >> >lapo@CYBERONE ~ >$ export CLASSPATH= > >lapo@CYBERONE ~ >$ gcj --main=Hello -gstabs Hello.java -o Hello.exe > >lapo@CYBERONE ~ >$ ./Hello.exe >hello world > >The only note is that I had to be sure CLASSPATH was empty or else >rt.jar was found before libgcj.jar and I got an error about >java.lang.Object being the wrong version. > >-- >Lapo 'Raist' Luchini >[EMAIL PROTECTED] (PGP & X.509 keys available) >http://www.lapo.it (ICQ UIN: 529796) > This does not match with my experience. I do not have CLASSPATH set. In my cygwin directory I only have:
\usr\share\gettext\Libintl.jar \usr\share\java\Libgcj-3.2.jar The only other jar files on my machine are in the JRE. I would hope that a standalone executable would not want to use them. Just in case I tried renaming rt.jar. Sure enough java Hello no longer works but recompiling and running ./Hello.exe still Results in a stackdump. The version of gcj I'm using is: C:\BruceA\java>gcj --version gcj (GCC) 3.2 20020818 (prerelease) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Why does your installation work and not mine? Regards, Bruce A. ============================================================================ Any opinions expressed in this e-mail are those of the individual and not necessarily those of Tyco Electronic Product Group. Any prices for the supply of goods or services are only valid if supported by a formal written quotation. This e-mail and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from Tyco Electronic Product Group are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivery to the intended recipient, be advised that you have received this e-mail in error and that any use is strictly prohibited. In this event, please notify us via e-mail at '[EMAIL PROTECTED]' or telephone on 0121 255 6499 and then delete the e-mail and any copies of it. ============================================================================ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/