Java (1 of 3): Gcj - Hello world exe (again)
Lapo Luchini
lapo@lapo.it
Mon Jan 13 03:04:00 GMT 2003
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
lapo@lapo.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/
More information about the Cygwin
mailing list