NetBeans Under OpenJDK 7 On OS X - Dual Display
Max (Weijun) Wang
Weijun.Wang at Sun.COM
Wed Jan 21 20:40:39 PST 2009
It seems even the simplest networking code fails.
$ cat ~/tmp/A.java
class A {
public static void main(String[] args) throws Exception {
new java.net.ServerSocket(10000).accept();
}
}
$ java A
Exception in thread "main" java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketAccept(Native Method)
at
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:
364)
at java.net.ServerSocket.implAccept(ServerSocket.java:513)
at java.net.ServerSocket.accept(ServerSocket.java:481)
at A.main(A.java:3)
Don't know why. The problem comes from C function NET_Accept, which is
mentioned in these files:
jdk/make/java/net/FILES_c.gmk
Include bsd_close.c when OS_VENDOR is FreeBSD
jdk/src/solaris/native/java/net/bsd_close.c
Defines a version of NET_Accept
jdk/src/solaris/native/java/net/net_util_md.h
Declares NET_Accept, using impl of bsd_close.c or JVM_Accept
depending on defined(__FreeBSD__)
I'm not familiar with BSD C coding. Anyway on Mac OS_VENDOR is Apple.
Max
On Dec 20, 2008, at 8:26 AM, Michael Franz wrote:
> Hi,
>
> I am running NetBeans on OS X using OpenJDK 7. This uses the X11
> implementation as there is no native Cocoa/Carbon Swing
> implementation. There are a few quirks that I would like to
> mention, maybe someone can indicate what part of the code these
> issue are in.
>
> 1. Menus - the cursor is sometimes 1 line item below what is
> highlighted
> 2. Dual display - opening new dialogs are centered between the
> displays (not the current display netbeans is in).
> 3. The log file has many of these exceptions:
> java.net.SocketException: Invalid argument
> at java.net.PlainSocketImpl.socketAccept(Native Method)
> at
> java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:
> 364)
> at java.net.ServerSocket.implAccept(ServerSocket.java:513)
> at java.net.ServerSocket.accept(ServerSocket.java:481)
> at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1010)
>
>
> Michael
>
More information about the bsd-port-dev
mailing list