This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NPE with gcc 3.4 when trying to open a tcp-socket


Andrew Haley wrote:
I'd love to investigate this, but without a test case I can't do much.


nothing easier than that:


Test.java
*************
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
public class Test {
	public static void main(String[] args) {
		Test test = new Test();
		test.run();
	}
	private void run() {
		Socket socket = null;
		try {
			socket = new Socket("localhost", 80);
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
*********
compiled with:
$ /usr/local/mygcj/bin/gcj -B/usr/local/mygcj \
   --main=Test -o test Test.java

joerg

--
Jörg Maisenbacher
   "There are only 10 types of people in the world:
    Those who understand binary and those who don't."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]