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

Jörg Maisenbacher joerg@maisenbachers.de
Mon Sep 15 17:34:00 GMT 2003


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."


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /