This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Java hello world link error
- From: "mauro zallocco" <mzallocc at nc dot rr dot com>
- To: <cygwin at cygwin dot com>, <jlsysinc at alltel dot net>
- Date: Sun, 21 Dec 2003 19:52:31 -0500
- Subject: Re: Java hello world link error
- Reply-to: <mzallocc at nc dot rr dot com>
Jon,
installing libiconv and using "--main=Test" did the trick.
Thanks.
I looked at http://gcc.gnu.org/java/ and found
http://www.linuxjournal.com/article.php?sid=4860
which discusses compiling java.
One last thing.
I noticed that the resulting Test.exe attempts to access the internet.
Is this expected ?
Its trying to access 24.25.4.107 which my getHost tool tells me is
rlghnc-dns-cac-02-dmfe1.nc.rr.com.
Mauro
mauro zallocco wrote:
> $ gcj Test.java
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
> cannot
> find -liconv
> collect2: ld returned 1 exit status
>
Jon A. Lambert" <at alltel dot net>
You probably need to install one or both of these:
$ cygcheck -c | grep iconv
libiconv 1.9.1-3 OK
libiconv2 1.9.1-3 OK
----------------------------------------------------
Test.java
class Test {
public static void main(String argv[]) {
System.out.println("Hello World");
}
}
/Mauro
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/