delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/07/05:51:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
x-gfisavedcharset: Windows-1252
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <C9150052B112D3119E9E0004ACA6E43702EFEBD9@tepg1.tepg.co.uk>
From: "Bruce Adams" <bruadams AT tycoint DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Java (1 of 3): Gcj - Hello world exe (again)
Date: Tue, 7 Jan 2003 09:33:34 -0000
MIME-Version: 1.0
X-OriginalArrivalTime: 07 Jan 2003 09:34:43.0578 (UTC) FILETIME=[02762DA0:01C2B630]

>-----Original Message-----
>From: Lapo Luchini [mailto:lapo AT lapo DOT it] 
>Sent: 06 January 2003 11:11
>To: cygwin AT cygwin DOT com
>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 AT CYBERONE ~
>$ export CLASSPATH=
>
>lapo AT CYBERONE ~
>$ gcj --main=Hello -gstabs Hello.java -o Hello.exe
>
>lapo AT 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
>lapo AT lapo DOT it (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 'helpdesk DOT tepg AT tycoint DOT com' 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019