Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 1998 01:50:53 +0100
From:      pb@fasterix.freenix.org (Pierre Beyssac)
To:        emulation@FreeBSD.ORG
Cc:        hackers@FreeBSD.ORG
Subject:   playing with the Linux JDK 1.1.3 under -current
Message-ID:  <19980107015053.TL50316@@>

next in thread | raw e-mail | index | archive | help
[ this is mainly an emulator problem, but as it seems to involve
  more general questions about differing socket semantics under
  Linux vs FreeBSD, I Cc: this to -hackers ]

I've been playing with the Linux JDK (v 1.1.3) under FreeBSD-current.

Works fairly well, except for two problems I encountered.

Note that the issue here is not so much having a running JDK (since
there are others, native projects for this under FreeBSD) as using
the Linux JDK as a compliance test for the Linux emulator :-)

	- fetching remote URLs in the Appletviewer (as in
	  appletviewer http://xxxx/some_cool_applet_page.html)
	  doesn't work ("already connected" error). Especially when
	  the connection takes a long time to establish (remote
	  site). In fact this occurs in the runtime code used for
	  any Java connect().

	- I have problems with a program using Netscape IFC
	  classes V1.1.2 (freezes when exposing its window), while
	  IFC 1.1.1 works perfectly fine.

I'm told by a Linux user that these both work ok with the JDK under
Linux, so these are probably not JDK bugs.

I know where the first problem comes from and have been able to
patch the Linux emulator code for a quick and dirty hack around
the problem, by ignoring the ISCONN error when returned by connect().
The JDK runtime is apparently not expecting this error when redoing
a connect() on a non-blocking socket, after the first connect()
failed with a EINPROGRESS. Note that the original JDK code itself
is hacked to work around Solaris socket bugs, which excuses this
rather disgusting way of handling things...

In the other case, the Java runtime is waiting (wchan=pause,
according to ps) and doesn't fetch a variable amount of data it
apparently got on its socket from the X server (it apparently fills
with X events as you move the mouse and click).

It all looks like subtle differences in the handling of non-blocking
sockets between Linux and FreeBSD. Does anyone know about any such
differences? I'm looking into this when I can spare a little time,
but I thought maybe it would be a good idea to ask there first :-)
-- 
Pierre Beyssac	      pb@fasterix.frmug.org pb@fasterix.freenix.org
{Free,Net,Open}BSD, Linux : il y a moins bien, mais c'est plus cher
    Free domains: http://www.eu.org/ or mail dns-manager@EU.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980107015053.TL50316>