NIO Selector creation

Joseph Gleason clash at tasam.com
Wed Jun 18 09:18:51 PDT 2003


I am having trouble using NIO under FreeBSD.  I am wondering if it is
because of something I am doing wrong or a problem with the port.

I am using 4.8-STABLE (May 21) and jdk-1.4.1p3_3

I have this line:
HTTPSelector =
java.nio.channels.spi.SelectorProvider.provider().openSelector();

This works with jdk 1.4.1 under WinXP.

Under FreeBSD I get:
root at tesla# java cc.glsn.test.HTTPKick fireduck.com /index.html 80 10 100
Exception in thread "main" java.lang.UnsatisfiedLinkError: init
        at sun.nio.ch.DevPollArrayWrapper.init(Native Method)
        at
sun.nio.ch.DevPollArrayWrapper.<init>(DevPollArrayWrapper.java:59)
        at
sun.nio.ch.DevPollSelectorImpl.<init>(DevPollSelectorImpl.java:54)
        at
sun.nio.ch.DevPollSelectorProvider.openSelector(DevPollSelectorProvider.java
:18)
        at cc.glsn.test.HTTPKick.<init>(HTTPKick.java:63)
        at cc.glsn.test.HTTPKick.main(HTTPKick.java:38)


I am just learning how to use NIO, so I certainly could be doing something
wrong.

My code is attached if anyone wants to look at it, but I suspect the problem
can be replicated by others with just that one line.  I swear my code is
usally neater than this...I am just messing around to learn NIO.

My thanks to anyone who might be able to help me with me problem.

--Joe Gleason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HTTPKick.java
Type: application/octet-stream
Size: 6359 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20030618/81a7e7a8/HTTPKick.obj


More information about the freebsd-java mailing list