Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3E19644E.6080904@lapo.it> Date: Mon, 06 Jan 2003 12:11:10 +0100 From: Lapo Luchini User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030102 X-Accept-Language: it, en, fr, es MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Java (1 of 3): Gcj - Hello world exe (again) References: In-Reply-To: X-Enigmail-Version: 0.71.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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) -- 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/