# Friday, 10 September 2010
« IKVM 0.44 Released | Main | New Development Snapshot »
New Development Snapshot

I've started on IPv6 support. The classic socket APIs (i.e. the java.net package) now supports IPv6. At the moment it is .NET only, because Mono on Windows doesn't appear to support IPv6 and on Linux you apparently cannot bind both an IPv4 and IPv6 socket to the same port at the same time (suggestions on this are welcome).

The implementation is based on a relatively straightforward port of the OpenJDK files TwoStacksPlainDatagramSocketImpl.c and TwoStacksPlainSocketImpl.c to Java. I wrote a Java Winsock API wrapper on top of the .NET Socket API (which in turn is a wrapper on the actual Winsock API). In the future the OpenJDK DualStack code should also be ported, for use on Vista/Win7 and probably Linux.

What remains to be done is update the nio socket code to support IPv6.

Changes:

  • Added some missing resources to IKVM.OpenJDK.Tools.dll.
  • Removed x64 JIT bug workaround that triggered another x64 bug.
  • Implemented IPv6 support (.NET only) for java.net package APIs.
  • Several fixes/improvements to java.net.NetworkInterface.
  • Implemented Graphics.drawImage() with AffineTransform.
  • Improved StandardGlyphVector.
  • FontMetrics fixes.
  • Inet[4|6]AddressImpl.lookupAllHostAddr() should throw UnknownHostException instead of returning an empty array.
  • Don't expose IPv6 network interface addresses when IPv6 isn't enabled.
  • Added workaround for Mono TimeZoneInfo bug.
  • Fix build on Linux.
  • Fixed java.lang.Thread to synchronize on private lock instead of Thread object in thread startup code, to avoid potential deadlock with user code.
  • Added check to make sure that vfs.zip exists, before building second pass version of IKVM.Runtime.dll, because it appears that mcs doesn't complain about missing resources.
  • Fixed bug #3056721.
  • Added explanatory message to Link Error if it is caused by a missing reference.

Binaries available here: ikvmbin-0.45.3905.zip

Friday, 10 September 2010 11:44:21 (W. Europe Daylight Time, UTC+02:00)  #    Comments [4]
Friday, 10 September 2010 13:54:33 (W. Europe Daylight Time, UTC+02:00)
Thanks for fixing #3056721 so quickly.
Do you have any instructions on how to build from source targeting .net 4.0 for all the shipped assemblies?
Cheers,
Martin
webrant
Friday, 10 September 2010 14:06:53 (W. Europe Daylight Time, UTC+02:00)
The 2.0 binaries can be used on .NET 4.0 without problems. If you explicitly want to build the .NET 4.0 version, you should get the code from cvs and use the instructions from the HOWTO file, except that you need the most recent nant release candidate and use "nant -t:net-4.0" to build.
Friday, 10 September 2010 16:00:17 (W. Europe Daylight Time, UTC+02:00)
Thanks Jeroen, all set now!
I think you will get a lot more people using it now since J# is pretty much unusable with .NET 4.0!
webrant
Friday, 10 September 2010 16:01:48 (W. Europe Daylight Time, UTC+02:00)
By default, Linux binds a socket to both IPv4 and IPv6. There are a couple ways to change this. First, if you set the sysctl net.ipv6.bindv6only to 1, an IPv6 socket will not accept IPv4 connections. This, however, breaks a lot of programs, including the Sun Java VM. Debian tried this and changed it back because it caused so many problems.

Also, you can use the setsockopt IPV6_V6ONLY to bind an IPv6 port only to IPv6. See ipv6(7) for more details.
Name
E-mail
Home page

I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.

Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)

Answer:  
Comment (HTML not allowed)  

Live Comment Preview