public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ashwin Kapur <akapur@bellatlantic.net>
To: help-gcc@gnu.org
Subject: gcj
Date: Tue, 23 Nov 1999 05:47:00 -0000	[thread overview]
Message-ID: <383A1FEC.91ADBFCB@bellatlantic.net> (raw)

Sorry if this is off topic but I don't see a newsgroup for
gcj specifically and this seems to be the closest one since
it's a compiler specific question.  I'm trying to compile
some java code into a native binary on suse 6.2 using the
gcj in gcc 2.95-2.

The Problem:

The java file compiles into an o file but the compiler
complains about the absence of a main.  The code contains a
main.  Is there some specific thing I'm supposed to be doing
to compile and like code with gcj.  Are there docs on this.

Is there some library I'm supposed to link to or something.

Thanks

Ashwin

Here is the source code.  It is an example from the java
tutorial.  

//---------------------------------------------------------------------
import java.io.*;
import java.net.*;

public class EchoClient {
    public static void main(String[] args) throws
IOException {
	
	Socket echoSocket = null;
	PrintWriter out = null;
	BufferedReader in = null;
	
	try {
	    echoSocket = new Socket("coredump", 7);
	    out = new PrintWriter(echoSocket.getOutputStream(),
true);
	    in = new BufferedReader(new InputStreamReader(
							  echoSocket.getInputStream()));
	} catch (UnknownHostException e) {
	    System.err.println("Don't know about host: coredump");
	    System.exit(1);
	} catch (IOException e) {
	    System.err.println("Couldn't get I/O for "
			       + "the connection to: coredump");
	    System.exit(1);
	}
	
	BufferedReader stdIn = new BufferedReader(
						  new InputStreamReader(System.in));
	String userInput;
	
	while ((userInput = stdIn.readLine()) != null) {
	    out.println(userInput);
	    System.out.println("echo: " + in.readLine());
	}
	
	out.close();
	in.close();
	stdIn.close();
	echoSocket.close();
    }
}
//--------------------------------------------------------------------------

-- 
#include <std_disclaimer>
#include <std_humor>

WARNING: multiple messages have this Message-ID
From: Ashwin Kapur <akapur@bellatlantic.net>
To: help-gcc@gnu.org
Subject: gcj
Date: Tue, 30 Nov 1999 23:28:00 -0000	[thread overview]
Message-ID: <383A1FEC.91ADBFCB@bellatlantic.net> (raw)
Message-ID: <19991130232800._JFHneijL6jrKfSa6upD0Y2mnR2pzZNcdWIZCiuGNCY@z> (raw)

Sorry if this is off topic but I don't see a newsgroup for
gcj specifically and this seems to be the closest one since
it's a compiler specific question.  I'm trying to compile
some java code into a native binary on suse 6.2 using the
gcj in gcc 2.95-2.

The Problem:

The java file compiles into an o file but the compiler
complains about the absence of a main.  The code contains a
main.  Is there some specific thing I'm supposed to be doing
to compile and like code with gcj.  Are there docs on this.

Is there some library I'm supposed to link to or something.

Thanks

Ashwin

Here is the source code.  It is an example from the java
tutorial.  

//---------------------------------------------------------------------
import java.io.*;
import java.net.*;

public class EchoClient {
    public static void main(String[] args) throws
IOException {
	
	Socket echoSocket = null;
	PrintWriter out = null;
	BufferedReader in = null;
	
	try {
	    echoSocket = new Socket("coredump", 7);
	    out = new PrintWriter(echoSocket.getOutputStream(),
true);
	    in = new BufferedReader(new InputStreamReader(
							  echoSocket.getInputStream()));
	} catch (UnknownHostException e) {
	    System.err.println("Don't know about host: coredump");
	    System.exit(1);
	} catch (IOException e) {
	    System.err.println("Couldn't get I/O for "
			       + "the connection to: coredump");
	    System.exit(1);
	}
	
	BufferedReader stdIn = new BufferedReader(
						  new InputStreamReader(System.in));
	String userInput;
	
	while ((userInput = stdIn.readLine()) != null) {
	    out.println(userInput);
	    System.out.println("echo: " + in.readLine());
	}
	
	out.close();
	in.close();
	stdIn.close();
	echoSocket.close();
    }
}
//--------------------------------------------------------------------------

-- 
#include <std_disclaimer>
#include <std_humor>

             reply	other threads:[~1999-11-23  5:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-23  5:47 Ashwin Kapur [this message]
1999-11-23  5:43 ` gcj Eric Doenges
1999-11-30 23:28   ` gcj Eric Doenges
1999-11-30 23:28 ` gcj Ashwin Kapur
     [not found] <200901181717.n0IHHMOM028799@smtp.google.com>
2009-01-20  1:06 ` gcj Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2009-01-18 17:17 gcj Franklyn Simon
2009-01-18 17:17 gcj Franklyn Simon
2004-04-27 15:24 gcj Plapp, Phillip
2004-04-23 15:45 gcj bserdar
2004-04-23 15:37 gcj Plapp, Phillip
1999-10-27 21:31 gcj Chris Majewski
1999-10-27 21:52 ` gcj Anthony Green
1999-10-31 13:57   ` gcj Anthony Green
1999-10-31 13:57 ` gcj Chris Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=383A1FEC.91ADBFCB@bellatlantic.net \
    --to=akapur@bellatlantic.net \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).