Date: 06 Aug 2003 11:09:13 -0400 From: "Michael E. Mercer" <mmercer@nc.rr.com> To: SeventyForty <seventyForty@hotmail.com> Cc: freebsd-java@freebsd.org Subject: Re: java nio stuff Message-ID: <1060182553.4201.13.camel@dual.mmercer.com> In-Reply-To: <Law14-OE73Pn5Y8IdwP0000876f@hotmail.com> References: <Law14-OE73Pn5Y8IdwP0000876f@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This problem has been encountered already... There is a logic problem in Sun's code. A quick hack for FreeBSD is to just remove everything except the line marked with >>>>>>. in src/solaris/sun/nio/ch/DefaultSelectorProvider.java public class DefaultSelectorProvider { /** * Prevent instantiation. */ private DefaultSelectorProvider() { } /** * Returns the default SelectorProvider. */ public static SelectorProvider create() { PrivilegedAction pa = new GetPropertyAction("os.version"); String result = (String) AccessController.doPrivileged(pa); String[] numbers = result.split("\\.", 0); if (numbers[1].compareTo("7") < 0) >>>>>>>>>>> return new sun.nio.ch.PollSelectorProvider(); else return new sun.nio.ch.DevPollSelectorProvider(); } } later MeM On Wed, 2003-08-06 at 10:47, SeventyForty wrote: > Hello FreeBSD Java people, > > I'm new to FreeBSD. I need to use the nio of Java 1.4.1 or above on FreeBSD. > > I'm currently using the native Java port 1.4.1 and I've just tried to run a game server I wrote which uses the nio and I got > > 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 java.nio.channels.Selector.open(Selector.java:209) > ........ > ........ > > Am I write in assuming that the nio hasn't been ported yet? If so is anyone working on it? are there any timeframes for when it might be ready? > > thanks in advance > > James > > > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1060182553.4201.13.camel>