<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>IKVM.NET Weblog</title>
    <link>http://weblog.ikvm.net/</link>
    <description>The development of a Java VM for .NET</description>
    <copyright>Jeroen Frijters</copyright>
    <lastBuildDate>Tue, 24 Jan 2012 12:48:53 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.5.3337.0</generator>
    <managingEditor>blog@jeroen.nu</managingEditor>
    <webMaster>blog@jeroen.nu</webMaster>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Time for a new snapshot. Not too many changes, but the IKVM.Reflection API changes
      should suggest what I've been working on.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated version to 7.1.4406.0.</li>
          <li>
         Handle Main-Class manifest value that spans multiple lines. Fix for bug #3461012.</li>
          <li>
         When constructing a generic class loader we can't use GetWrapperFromType() on the
         type arguments, because they might refer to a subtype that is currently being loaded.</li>
          <li>
         Made base TypeWrapper resolution lazy for compiled and .NET TypeWrappers.</li>
          <li>
         Use modopt custom modifiers for methods instead of name mangling and NameSigAttribute.</li>
          <li>
         Added version info resource to JVM.DLL. Modified version of patch #3472413.</li>
          <li>
         Added version info resource to ikvm-native-win32-{arch}.dll. Modified version of patch
         #3472413.</li>
          <li>
         Added support for delegates with ByRef parameters.</li>
          <li>
         When a dynamic only interface method ends up being "implemented" by a static or non-public
         method, it should throw the appropriate exception.</li>
          <li>
         When instantiating a delegate and the object passed in does not properly implement
         the delegate's Method interface, bind the delegate to an error stub that throws the
         appropriate error.</li>
          <li>
         The right remap filename should be put in the SourceFileAttribute, instead of the
         last one.</li>
          <li>
         Stack trace elements in methods in remapped .NET types should not list the source
         filename as map.xml.</li>
          <li>
         IKVM.Reflection: FieldInfo.IsAssembly should test for FieldAttributes.Assembly access,
         not FieldAttributes.Family.</li>
          <li>
         IKVM.Reflection: Added Module.__FileAlignment property.</li>
          <li>
         IKVM.Reflection: Added ManifestResourceInfo.__Offset property.</li>
          <li>
         IKVM.Reflection: Avoid the need for (expensive) ResolveMethod call when emitting debug
         symbols. Thanks to Miguel Garcia for pointing this out.</li>
          <li>
         IKVM.Reflection: Add AssemblyName.__Hash property (to expose the hash in an AssemblyRef).</li>
          <li>
         IKVM.Reflection: Added Module.__EntryPointRVA and Module.__EntryPointToken properties.</li>
          <li>
         IKVM.Reflection: Added MethodBase.__MethodRVA property.</li>
          <li>
         IKVM.Reflection: Fixed regression introduced with AssemblyName rewrite. The AssemblyName
         returned from __GetReferencedAssemblies() should include an empty public key token
         if the referenced assembly is not strong named.</li>
          <li>
         IKVM.Reflection: API change. Allow Type.MetadataToken to be called on missing type
         (it will return 0 or the token hint when the type was forwarded).</li>
          <li>
         IKVM.Reflection: Added Universe.ResolveType() API that can be used to construct missing
         types.</li>
          <li>
         IKVM.Reflection: Fixed various Module.Resolve* methods to throw proper exception when
         wrong metadata token is supplied.</li>
          <li>
         IKVM.Reflection: Fixed type parameter binding for missing types.</li>
          <li>
         IKVM.Reflection: Added Module.__EnumerateCustomAttributeTable() API.</li>
          <li>
         IKVM.Reflection: Removed Module.__GetDeclarativeSecurityFor() API.</li>
          <li>
         IKVM.Reflection: Added CustomAttributeData.__Parent API.</li>
          <li>
         IKVM.Reflection: Added Module.__ImageRuntimeVersion API.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.1.4406.zip">ikvmbin-7.1.4406.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</link>
      <pubDate>Tue, 24 Jan 2012 12:48:53 GMT</pubDate>
      <description>&lt;p&gt;
   Time for a new snapshot. Not too many changes, but the IKVM.Reflection API changes
   should suggest what I've been working on.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated version to 7.1.4406.0.&lt;/li&gt;
   &lt;li&gt;
      Handle Main-Class manifest value that spans multiple lines. Fix for bug #3461012.&lt;/li&gt;
   &lt;li&gt;
      When constructing a generic class loader we can't use GetWrapperFromType() on the
      type arguments, because they might refer to a subtype that is currently being loaded.&lt;/li&gt;
   &lt;li&gt;
      Made base TypeWrapper resolution lazy for compiled and .NET TypeWrappers.&lt;/li&gt;
   &lt;li&gt;
      Use modopt custom modifiers for methods instead of name mangling and NameSigAttribute.&lt;/li&gt;
   &lt;li&gt;
      Added version info resource to JVM.DLL. Modified version of patch #3472413.&lt;/li&gt;
   &lt;li&gt;
      Added version info resource to ikvm-native-win32-{arch}.dll. Modified version of patch
      #3472413.&lt;/li&gt;
   &lt;li&gt;
      Added support for delegates with ByRef parameters.&lt;/li&gt;
   &lt;li&gt;
      When a dynamic only interface method ends up being "implemented" by a static or non-public
      method, it should throw the appropriate exception.&lt;/li&gt;
   &lt;li&gt;
      When instantiating a delegate and the object passed in does not properly implement
      the delegate's Method interface, bind the delegate to an error stub that throws the
      appropriate error.&lt;/li&gt;
   &lt;li&gt;
      The right remap filename should be put in the SourceFileAttribute, instead of the
      last one.&lt;/li&gt;
   &lt;li&gt;
      Stack trace elements in methods in remapped .NET types should not list the source
      filename as map.xml.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: FieldInfo.IsAssembly should test for FieldAttributes.Assembly access,
      not FieldAttributes.Family.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added Module.__FileAlignment property.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added ManifestResourceInfo.__Offset property.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Avoid the need for (expensive) ResolveMethod call when emitting debug
      symbols. Thanks to Miguel Garcia for pointing this out.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Add AssemblyName.__Hash property (to expose the hash in an AssemblyRef).&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added Module.__EntryPointRVA and Module.__EntryPointToken properties.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added MethodBase.__MethodRVA property.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed regression introduced with AssemblyName rewrite. The AssemblyName
      returned from __GetReferencedAssemblies() should include an empty public key token
      if the referenced assembly is not strong named.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: API change. Allow Type.MetadataToken to be called on missing type
      (it will return 0 or the token hint when the type was forwarded).&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added Universe.ResolveType() API that can be used to construct missing
      types.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed various Module.Resolve* methods to throw proper exception when
      wrong metadata token is supplied.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed type parameter binding for missing types.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added Module.__EnumerateCustomAttributeTable() API.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Removed Module.__GetDeclarativeSecurityFor() API.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added CustomAttributeData.__Parent API.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added Module.__ImageRuntimeVersion API.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.1.4406.zip"&gt;ikvmbin-7.1.4406.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=a7daa45b-8d34-4fce-b922-fb29b4e7ad9c</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      A couple of annoying bugs have been reported since 7.0 was released, so I decided
      to do an update.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 7.0.4335.1.</li>
          <li>
         FileStore for non-accessible drive should throw exception when trying to create the
         FileStore, not when accessing the name() or type() properties.</li>
          <li>
         Graphics2D.clip(null) should only throw NPE for a Component graphics.</li>
          <li>
         Don't crash when ikvmc -resource: or -externalresource: option doesn't contain an
         = sign.</li>
          <li>
         Handle Main-Class manifest value that spans multiple lines. Fix for bug #3461012.</li>
          <li>
         Informational messages should not be treated as error when -warnaserror is specified.
         Fix for #3443377.</li>
          <li>
         Don't enforce pre-1.5 class name rules in ikvmc (since HotSpot doesn't enforce any
         naming rules for classes loaded by the system (and boot) class loader, by default).
         Fix for #3443373.</li>
          <li>
         Fix for #3441959.</li>
          <li>
         Throwable.addSuppressed() didn't have a proper parameter name.</li>
          <li>
         Mark getSpace0 with SecuritySafeCritical to avoid getting an exception with .NET 4</li>
          <li>
         Bug fix. Removed incorrect check for uninitialized objects on backward branch.</li>
          <li>
         Don't crash when ikvmc -resource: or -externalresource: option doesn't contain an
         = sign.</li>
          <li>
         Added AssemblyInformationalVersionAttribute to OpenJDK assemblies (to set the "Product
         Version"). Part of patch #3458997.</li>
          <li>
         Include copyright and metadata in IKVM.OpenJDK.Tools.dll. Part of patch #3458997.</li>
          <li>
         Bug fix. Don't call Finish on unloadable TypeWrapper.</li>
          <li>
         Bug fix. When constructing a generic class loader we can't use GetWrapperFromType()
         on the type arguments, because they might refer to a subtype that is currently being
         loaded.</li>
          <li>
         Fix. When decoding a NameSigAttribute it is possible that a type does not exist (i.e.
         is an unloadable) and that results in a warning emitted against the referenced assemblies
         class loader.</li>
          <li>
         Suppress annotation custom attributes when enumerating inner classes.</li>
          <li>
         IKVM.Reflection: Bug fix. FieldInfo.IsAssembly should test for FieldAttributes.Assembly
         access, not FieldAttributes.Family.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.0.4335.1.zip">ikvmbin-7.0.4335.1.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-7.0.4335.1.zip">ikvmsrc-7.0.4335.1.zip</a>, <a href="http://www.frijters.net/openjdk7-b147-stripped.zip">openjdk7-b147-stripped.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=b759e708-8588-4066-a9bb-9f83069fc6bd" />
      </body>
      <title>IKVM.NET 7.0 Update 1 Release Candidate 0</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</link>
      <pubDate>Tue, 03 Jan 2012 12:24:44 GMT</pubDate>
      <description>&lt;p&gt;
   A couple of annoying bugs have been reported since 7.0 was released, so I decided
   to do an update.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 7.0.4335.1.&lt;/li&gt;
   &lt;li&gt;
      FileStore for non-accessible drive should throw exception when trying to create the
      FileStore, not when accessing the name() or type() properties.&lt;/li&gt;
   &lt;li&gt;
      Graphics2D.clip(null) should only throw NPE for a Component graphics.&lt;/li&gt;
   &lt;li&gt;
      Don't crash when ikvmc -resource: or -externalresource: option doesn't contain an
      = sign.&lt;/li&gt;
   &lt;li&gt;
      Handle Main-Class manifest value that spans multiple lines. Fix for bug #3461012.&lt;/li&gt;
   &lt;li&gt;
      Informational messages should not be treated as error when -warnaserror is specified.
      Fix for #3443377.&lt;/li&gt;
   &lt;li&gt;
      Don't enforce pre-1.5 class name rules in ikvmc (since HotSpot doesn't enforce any
      naming rules for classes loaded by the system (and boot) class loader, by default).
      Fix for #3443373.&lt;/li&gt;
   &lt;li&gt;
      Fix for #3441959.&lt;/li&gt;
   &lt;li&gt;
      Throwable.addSuppressed() didn't have a proper parameter name.&lt;/li&gt;
   &lt;li&gt;
      Mark getSpace0 with SecuritySafeCritical to avoid getting an exception with .NET 4&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Removed incorrect check for uninitialized objects on backward branch.&lt;/li&gt;
   &lt;li&gt;
      Don't crash when ikvmc -resource: or -externalresource: option doesn't contain an
      = sign.&lt;/li&gt;
   &lt;li&gt;
      Added AssemblyInformationalVersionAttribute to OpenJDK assemblies (to set the "Product
      Version"). Part of patch #3458997.&lt;/li&gt;
   &lt;li&gt;
      Include copyright and metadata in IKVM.OpenJDK.Tools.dll. Part of patch #3458997.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Don't call Finish on unloadable TypeWrapper.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. When constructing a generic class loader we can't use GetWrapperFromType()
      on the type arguments, because they might refer to a subtype that is currently being
      loaded.&lt;/li&gt;
   &lt;li&gt;
      Fix. When decoding a NameSigAttribute it is possible that a type does not exist (i.e.
      is an unloadable) and that results in a warning emitted against the referenced assemblies
      class loader.&lt;/li&gt;
   &lt;li&gt;
      Suppress annotation custom attributes when enumerating inner classes.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Bug fix. FieldInfo.IsAssembly should test for FieldAttributes.Assembly
      access, not FieldAttributes.Family.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.0.4335.1.zip"&gt;ikvmbin-7.0.4335.1.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-7.0.4335.1.zip"&gt;ikvmsrc-7.0.4335.1.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk7-b147-stripped.zip"&gt;openjdk7-b147-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=b759e708-8588-4066-a9bb-9f83069fc6bd"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=b759e708-8588-4066-a9bb-9f83069fc6bd</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=863d521d-a792-45a3-b32f-c323db25c2a4</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=863d521d-a792-45a3-b32f-c323db25c2a4</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=863d521d-a792-45a3-b32f-c323db25c2a4</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=863d521d-a792-45a3-b32f-c323db25c2a4</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      IKVM.NET 0.46 is the last OpenJDK 6 based release, so it will be supported longer
      than usual. I haven't yet decided how long exactly, but in any case here is a release
      candidate for an update release that incorporates many of the fixes that have been
      done since 0.46 was released.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 0.46.0.2.</li>
          <li>
         Bug fix. TypeWrapper.IsAssignableTo() didn't handle arrays with primitive elements
         properly.</li>
          <li>
         Bug fix. Exception blocks inside potential try { } finally { } blocks were not handled
         correctly. Could result in finally blocks that run multiple times (when an exception
         occurs).</li>
          <li>
         Fix for #3404229.</li>
          <li>
         Bug fix. Don't create a miranda method if the class already has a static method with
         the same signature.</li>
          <li>
         Added workaround for another x64 JIT bug. See https://sourceforge.net/mailarchive/message.php?msg_id=28250469</li>
          <li>
         Newer versions of ICSharpCode.SharpZipLib.dll require the ZipEntry size to be set
         explicitly, otherwise the generated archive will not be compatible with older zip
         implementations (like Java 6's java.util.zip).</li>
          <li>
         Fixed serialization interop bugs.</li>
          <li>
         Bug fix. When an abstract .NET type implements System.IComparable (and hence java.lang.Comparable)
         the resulting stub is not usable from Java because the compareTo method is missing.
         This fix adds the missing method.</li>
          <li>
         Fix and enhancement. When a .NET type implements a shadowed interface, we now also
         publish the original interface (e.g. if the .NET type implements System.IComparable,
         Java code will now see java.lang.Comparable and System.IComparable). In addition,
         the new code makes sure that when a .NET type explicitly implements both System.IComparable
         and java.lang.Comparable that the Java code will not see java.lang.Comparable twice.</li>
          <li>
         Bug fix. Make FileOutputStream in append mode always append.</li>
          <li>
         Add support for overriding constructor body in map.xml.</li>
          <li>
         Make sure that Thread.getContextClassLoader() and Thread.setContextClassLoader() are
         JITed before Thread.isCCLOverridden().</li>
          <li>
         Workaround .NET 2.0 bug in GetType() that could cause problems with creating proxies
         for compiled types.</li>
          <li>
         Bug fix. Exceptions declared with ThrowsAttribute(Type) (in .NET code) did not get
         exported properly by ikvmstub.</li>
          <li>
         Fix ClassLoader.findLoadedClass0() to handle null string.</li>
          <li>
         Implemented support for annotation defaults in ikvmstub.</li>
          <li>
         Bug fix. Final instance fields that have a type 2 access property should also have
         a (private) setter for reflection and serialization.</li>
          <li>
         Bug fix. Set os.name and os.version properties correctly when running on unknown Windows
         version (Windows 8).</li>
          <li>
         Bug fix. IPInterfaceProperties.GetIPv_Properties() can throw an exception (and does
         so on Win 8 for some interfaces).</li>
          <li>
         Don't open the remap file in read/write mode.</li>
          <li>
         Bug fix. Make sure sun.misc.Launcher is initialized before setting a security manager,
         because Launcher assumes there is no security manager yet.</li>
          <li>
         Implemented com.sun.security.auth.module.NTSystem.getCurrent().</li>
          <li>
         Bug fix. When calling a final method on a remapped type we can't call the instance
         method in the remapped type, but we have to call the instancehelper instead.</li>
          <li>
         Fix. When decoding a NameSigAttribute it is possible that a type does not exist (i.e.
         is an unloadable) and that results in a warning emitted against the referenced assemblies
         class loader.</li>
          <li>
         Bug fix. Removed incorrect verifier check for uninitialized objects on backward branch.</li>
          <li>
         Handle Main-Class manifest value that spans multiple lines. Fix for bug #3461012.</li>
          <li>
         Retain reflection field ordering for ikvmc compiled code (not required by spec, but
         to improve compatibility with broken code).</li>
          <li>
         Don't use "slow path" for field reflection on remapped types (as getting a Throwable
         field from cli.System.Exception will cause an exception, but the slow path will generate
         a different exception).</li>
          <li>
         Backported the new method override resolution code.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-0.46.0.2.zip">ikvmbin-0.46.0.2.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.46.0.2.zip">ikvmsrc-0.46.0.2.zip</a>, <a href="http://www.frijters.net/openjdk6-b22-stripped.zip">openjdk6-b22-stripped.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=863d521d-a792-45a3-b32f-c323db25c2a4" />
      </body>
      <title>IKVM.NET 0.46 Update 1 Release Candidate 0</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=863d521d-a792-45a3-b32f-c323db25c2a4</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=863d521d-a792-45a3-b32f-c323db25c2a4</link>
      <pubDate>Wed, 21 Dec 2011 08:54:46 GMT</pubDate>
      <description>&lt;p&gt;
   IKVM.NET 0.46 is the last OpenJDK 6 based release, so it will be supported longer
   than usual. I haven't yet decided how long exactly, but in any case here is a release
   candidate for an update release that incorporates many of the fixes that have been
   done since 0.46 was released.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 0.46.0.2.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. TypeWrapper.IsAssignableTo() didn't handle arrays with primitive elements
      properly.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Exception blocks inside potential try { } finally { } blocks were not handled
      correctly. Could result in finally blocks that run multiple times (when an exception
      occurs).&lt;/li&gt;
   &lt;li&gt;
      Fix for #3404229.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Don't create a miranda method if the class already has a static method with
      the same signature.&lt;/li&gt;
   &lt;li&gt;
      Added workaround for another x64 JIT bug. See https://sourceforge.net/mailarchive/message.php?msg_id=28250469&lt;/li&gt;
   &lt;li&gt;
      Newer versions of ICSharpCode.SharpZipLib.dll require the ZipEntry size to be set
      explicitly, otherwise the generated archive will not be compatible with older zip
      implementations (like Java 6's java.util.zip).&lt;/li&gt;
   &lt;li&gt;
      Fixed serialization interop bugs.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. When an abstract .NET type implements System.IComparable (and hence java.lang.Comparable)
      the resulting stub is not usable from Java because the compareTo method is missing.
      This fix adds the missing method.&lt;/li&gt;
   &lt;li&gt;
      Fix and enhancement. When a .NET type implements a shadowed interface, we now also
      publish the original interface (e.g. if the .NET type implements System.IComparable,
      Java code will now see java.lang.Comparable and System.IComparable). In addition,
      the new code makes sure that when a .NET type explicitly implements both System.IComparable
      and java.lang.Comparable that the Java code will not see java.lang.Comparable twice.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Make FileOutputStream in append mode always append.&lt;/li&gt;
   &lt;li&gt;
      Add support for overriding constructor body in map.xml.&lt;/li&gt;
   &lt;li&gt;
      Make sure that Thread.getContextClassLoader() and Thread.setContextClassLoader() are
      JITed before Thread.isCCLOverridden().&lt;/li&gt;
   &lt;li&gt;
      Workaround .NET 2.0 bug in GetType() that could cause problems with creating proxies
      for compiled types.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Exceptions declared with ThrowsAttribute(Type) (in .NET code) did not get
      exported properly by ikvmstub.&lt;/li&gt;
   &lt;li&gt;
      Fix ClassLoader.findLoadedClass0() to handle null string.&lt;/li&gt;
   &lt;li&gt;
      Implemented support for annotation defaults in ikvmstub.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Final instance fields that have a type 2 access property should also have
      a (private) setter for reflection and serialization.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Set os.name and os.version properties correctly when running on unknown Windows
      version (Windows 8).&lt;/li&gt;
   &lt;li&gt;
      Bug fix. IPInterfaceProperties.GetIPv_Properties() can throw an exception (and does
      so on Win 8 for some interfaces).&lt;/li&gt;
   &lt;li&gt;
      Don't open the remap file in read/write mode.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Make sure sun.misc.Launcher is initialized before setting a security manager,
      because Launcher assumes there is no security manager yet.&lt;/li&gt;
   &lt;li&gt;
      Implemented com.sun.security.auth.module.NTSystem.getCurrent().&lt;/li&gt;
   &lt;li&gt;
      Bug fix. When calling a final method on a remapped type we can't call the instance
      method in the remapped type, but we have to call the instancehelper instead.&lt;/li&gt;
   &lt;li&gt;
      Fix. When decoding a NameSigAttribute it is possible that a type does not exist (i.e.
      is an unloadable) and that results in a warning emitted against the referenced assemblies
      class loader.&lt;/li&gt;
   &lt;li&gt;
      Bug fix. Removed incorrect verifier check for uninitialized objects on backward branch.&lt;/li&gt;
   &lt;li&gt;
      Handle Main-Class manifest value that spans multiple lines. Fix for bug #3461012.&lt;/li&gt;
   &lt;li&gt;
      Retain reflection field ordering for ikvmc compiled code (not required by spec, but
      to improve compatibility with broken code).&lt;/li&gt;
   &lt;li&gt;
      Don't use "slow path" for field reflection on remapped types (as getting a Throwable
      field from cli.System.Exception will cause an exception, but the slow path will generate
      a different exception).&lt;/li&gt;
   &lt;li&gt;
      Backported the new method override resolution code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-0.46.0.2.zip"&gt;ikvmbin-0.46.0.2.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.46.0.2.zip"&gt;ikvmsrc-0.46.0.2.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b22-stripped.zip"&gt;openjdk6-b22-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=863d521d-a792-45a3-b32f-c323db25c2a4"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=863d521d-a792-45a3-b32f-c323db25c2a4</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      There are a couple of subtle differences between the JVM and CLR with respect to member
      accessibility. For example, the JVM will allow you to access public members in non-public
      base classes:
   </p>
        <p>
          <code>package p1;<br /><br />
      class Base {<br />
          public int foo;<br />
      }<br /><br />
      public class Derived extends Base {<br />
      }<br /><br />
      package p2;<br /><br />
      class Test {<br />
          public static void main(String[] args) {<br />
             p1.Derived d = new p1.Derived();<br />
             d.foo = 42;<br />
          }<br />
      }</code>
        </p>
        <p>
      If you compile p1 and p2 seperately with ikvmc and look inside the resulting assemblies,
      you'll see that ikvmc generated a foo property in Derived. It needs to do this, because
      the CLR won't allow code from another assembly to access the members of Base.
   </p>
        <p>
      In the IKVM source code this type of access stubs is known as type 1. As you'd expect
      there are also type 2 access stubs. These are generated when a public (or protected)
      member exposes a non-public type:
   </p>
        <p>
          <code>package p1;<br /><br />
      class Foo { }<br /><br />
      public class Bar {<br />
        public Foo field = new Foo();<br />
      }<br /><br />
      package p2;<br /><br />
      class Test {<br />
          public static void main(String[] args) {<br />
             p1.Bar b = new p1.Bar();<br />
             System.out.println(b.field);<br />
             b.field = null;<br />
          }<br />
      }</code>
        </p>
        <p>
      Once again, if you compile p1 and p2 into separate assemblies with ikvmc, you'll see
      that field will be accessed through a property. In this case the property type is
      erased to the first public base type and a custom modifier is attached to make sure
      the property signature is unique (and to be able to recover the real type).
   </p>
        <p>
      These type 2 access stubs were originally generated (in some cases) by ikvmc to support
      accessing these members from C#, because the CLR, like the JVM, doesn't care about
      the visibility of the types in a signature when it considers member accessibility.
   </p>
        <p>
      However, since .NET 4.0 there is a new factor to consider, when <a href="http://msdn.microsoft.com/en-us/library/ee191569.aspx">level
      2 transparent code</a>  tries to access a member, the types in the member signature
      (except for the custom modifiers) must all be visible to the caller.
   </p>
        <p>
      I have not seen this last fact documented anywhere yet.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d" />
      </body>
      <title>Accessibility, Visibility and Transparency</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</link>
      <pubDate>Mon, 19 Dec 2011 10:57:13 GMT</pubDate>
      <description>&lt;p&gt;
   There are a couple of subtle differences between the JVM and CLR with respect to member
   accessibility. For example, the JVM will allow you to access public members in non-public
   base classes:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;package p1;&lt;br&gt;
   &lt;br&gt;
   class Base {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; public int foo;&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   public class Derived extends Base {&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   package p2;&lt;br&gt;
   &lt;br&gt;
   class Test {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String[] args) {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p1.Derived d = new p1.Derived();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d.foo = 42;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
   }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   If you compile p1 and p2 seperately with ikvmc and look inside the resulting assemblies,
   you'll see that ikvmc generated a foo property in Derived. It needs to do this, because
   the CLR won't allow code from another assembly to access the members of Base.
&lt;/p&gt;
&lt;p&gt;
   In the IKVM source code this type of access stubs is known as type 1. As you'd expect
   there are also type 2 access stubs. These are generated when a public (or protected)
   member exposes a non-public type:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;package p1;&lt;br&gt;
   &lt;br&gt;
   class Foo { }&lt;br&gt;
   &lt;br&gt;
   public class Bar {&lt;br&gt;
   &amp;nbsp; public Foo field = new Foo();&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   package p2;&lt;br&gt;
   &lt;br&gt;
   class Test {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String[] args) {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p1.Bar b = new p1.Bar();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(b.field);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.field = null;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
   }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   Once again, if you compile p1 and p2 into separate assemblies with ikvmc, you'll see
   that field will be accessed through a property. In this case the property type is
   erased to the first public base type and a custom modifier is attached to make sure
   the property signature is unique (and to be able to recover the real type).
&lt;/p&gt;
&lt;p&gt;
   These type 2 access stubs were originally generated (in some cases) by ikvmc to support
   accessing these members from C#, because the CLR, like the JVM, doesn't care about
   the visibility of the types in a signature when it considers member accessibility.
&lt;/p&gt;
&lt;p&gt;
   However, since .NET 4.0 there is a new factor to consider, when &lt;a href="http://msdn.microsoft.com/en-us/library/ee191569.aspx"&gt;level
   2 transparent code&lt;/a&gt;&amp;nbsp; tries to access a member, the types in the member signature
   (except for the custom modifiers) must all be visible to the caller.
&lt;/p&gt;
&lt;p&gt;
   I have not seen this last fact documented anywhere yet.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=a0623e1e-8dd9-43a5-9097-d7014a2dfb7d</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I've been doing some cleanup and refactoring and in the process removed some limitations
      and fixed a bunch of corner cases.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated version to 7.1.4366.0. 
      </li>
          <li>
         Fixed Class.getDeclaredClasses() to throw correct exception when one on the inner
         classes cannot be loaded. 
      </li>
          <li>
         Removed class name length limitation. 
      </li>
          <li>
         Split ikvmc compilation into three passes to support classes that extend a class nested
         inside itself. 
      </li>
          <li>
         Include copyright and metadata in IKVM.OpenJDK.Tools.dll. Part of patch #3458997. 
      </li>
          <li>
         Added AssemblyInformationalVersionAttribute to OpenJDK assemblies (to set the "Product
         Version"). Part of patch #3458997. 
      </li>
          <li>
         When casting arguments we should use the actual method parameter types, instead of
         the call site types (which can differ in the case of unloadable types (with crazy
         class loader trickery)). 
      </li>
          <li>
         Unloadable types can't violate loader constraints. 
      </li>
          <li>
         Made override stub generation more consistent. 
      </li>
          <li>
         Generate override stub for miranda method, when necessary. 
      </li>
          <li>
         Fixed ikvcm to not crash when ikvmc -resource: or -externalresource: option doesn't
         contain an = sign. 
      </li>
          <li>
         Fixed unloadable corner case (that can only be generated by playing weird class loader
         tricks). 
      </li>
          <li>
         Verifier bug fix. Removed incorrect check for uninitialized objects on backward branch. 
      </li>
          <li>
         IKVM.Reflection: Support setting an invalid culture using AssemblyBuilder.__SetAssemblyCulture(). 
      </li>
          <li>
         IKVM.Reflection: AssemblyCultureAttribute should not influence the LCID of the version
         info resource. 
      </li>
          <li>
         IKVM.Reflection: Removed static Create() from __StandAloneMethodSig and added Universe.MakeStandAloneMethodSig().</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.1.4366.zip">ikvmbin-7.1.4366.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=39c2a950-9f73-4823-853b-28ecf4e15ca4" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</link>
      <pubDate>Fri, 16 Dec 2011 09:07:11 GMT</pubDate>
      <description>&lt;p&gt;
   I've been doing some cleanup and refactoring and in the process removed some limitations
   and fixed a bunch of corner cases.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated version to 7.1.4366.0. 
   &lt;li&gt;
      Fixed Class.getDeclaredClasses() to throw correct exception when one on the inner
      classes cannot be loaded. 
   &lt;li&gt;
      Removed class name length limitation. 
   &lt;li&gt;
      Split ikvmc compilation into three passes to support classes that extend a class nested
      inside itself. 
   &lt;li&gt;
      Include copyright and metadata in IKVM.OpenJDK.Tools.dll. Part of patch #3458997. 
   &lt;li&gt;
      Added AssemblyInformationalVersionAttribute to OpenJDK assemblies (to set the "Product
      Version"). Part of patch #3458997. 
   &lt;li&gt;
      When casting arguments we should use the actual method parameter types, instead of
      the call site types (which can differ in the case of unloadable types (with crazy
      class loader trickery)). 
   &lt;li&gt;
      Unloadable types can't violate loader constraints. 
   &lt;li&gt;
      Made override stub generation more consistent. 
   &lt;li&gt;
      Generate override stub for miranda method, when necessary. 
   &lt;li&gt;
      Fixed ikvcm to not crash when ikvmc -resource: or -externalresource: option doesn't
      contain an = sign. 
   &lt;li&gt;
      Fixed unloadable corner case (that can only be generated by playing weird class loader
      tricks). 
   &lt;li&gt;
      Verifier bug fix. Removed incorrect check for uninitialized objects on backward branch. 
   &lt;li&gt;
      IKVM.Reflection: Support setting an invalid culture using AssemblyBuilder.__SetAssemblyCulture(). 
   &lt;li&gt;
      IKVM.Reflection: AssemblyCultureAttribute should not influence the LCID of the version
      info resource. 
   &lt;li&gt;
      IKVM.Reflection: Removed static Create() from __StandAloneMethodSig and added Universe.MakeStandAloneMethodSig().&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.1.4366.zip"&gt;ikvmbin-7.1.4366.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=39c2a950-9f73-4823-853b-28ecf4e15ca4"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=39c2a950-9f73-4823-853b-28ecf4e15ca4</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I've released <a href="https://sourceforge.net/projects/ikvm/files/ikvm/7.0.4335.0/">IKVM.NET
      7.0</a> to SourceForge. The binaries are identical to the ones in <a href="/PermaLink.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0">release
      candidate 0</a>.
   </p>
        <p>
          <b>Release Notes</b>
        </p>
        <p>
      This document lists the improvements, known issues and incompatibilities.
   </p>
        <p>
          <strong>What's New</strong> (relative to <a href="/PermaLink.aspx?guid=94934445-9b06-4a81-b76b-fcd23d4f6ec2">IKVM.NET
      0.46</a>):
   </p>
        <ul>
          <li>
         Integrated OpenJDK 7 b147. 
      </li>
          <li>
         Implemented Java 7 JVM changes. 
      </li>
          <li>
         Java annotations on statically compiled code are now returned as java.lang.reflect.Proxy
         objects for compability with broken code that assumes this is always the case. 
      </li>
          <li>
         Added delegate conversion for java.lang.reflect.InvocationHandler to ikvm.runtime.Delegates. 
      </li>
          <li>
         Various remap file improvements. 
      </li>
          <li>
         Changed build and JNI code to use different names for the Windows x86 and x64 versions
         of the native dll. 
      </li>
          <li>
         Retain reflection field ordering for ikvmc compiled code (not required by spec, but
         to improve compatibility with broken code). 
      </li>
          <li>
         Various AWT fixes. 
      </li>
          <li>
         Interop between <a href="/PermaLink.aspx?guid=de964df2-d54f-455b-8ec6-5288bbb4b532">java.lang.AutoCloseable</a> and
         System.IDisposable. 
      </li>
          <li>
         Various build system improvements. 
      </li>
          <li>
         Added ikvmc -warnaserror option. 
      </li>
          <li>
         Fixed java.io.FileOutputStream in append mode to use atomic append. 
      </li>
          <li>
         Various performance improvements. 
      </li>
          <li>
         Added -Xnoglobbing option to ikvm.exe. 
      </li>
          <li>
         Various minor fixes. 
      </li>
          <li>
         Implemented dual stack sockets (Windows Vista and up only). 
      </li>
          <li>
         Implemented platform MBean server. 
      </li>
          <li>
         Implemented SocketChannel.sendOutOfBandData(). 
      </li>
          <li>
         Implemented DatagramChannel multicast methods. 
      </li>
          <li>
         Removed mapping of System.Security.VerificationException to java.lang.VerifyError. 
      </li>
          <li>
         IKVM.Reflection: Massive enhancements to support a very large portion of the managed
         PE capabilities (much more than System.Reflection.Emit).</li>
        </ul>
        <p>
          <b>Runtime</b>
        </p>
        <ul>
          <li>
         Code unloading (aka class GC) is not supported. 
      </li>
          <li>
         In Java static initializers can deadlock, on .NET some threads can see uninitialized
         state in cases where deadlock would occur on the JVM. 
      </li>
          <li>
         JNI<br />
           
         <ul><li>
               Only supported in the default AppDomain. 
            </li><li>
               Only the JNICALL calling convention is supported! (On Windows, HotSpot appears to
               also support the cdecl calling convention). 
            </li><li>
               Cannot call string contructors on already existing string instances 
            </li><li>
               A few limitations in Invocation API support<br />
                 
               <ul><li>
                     The Invocation API is only supported when running on .NET. 
                  </li><li>
                     JNI_CreateJavaVM: init options "-verbose[:class|:gc|:jni]", "vfprintf", "exit" and
                     "abort" are not implemented. The JDK 1.1 version of JavaVMInitArgs isn't supported. 
                  </li><li>
                     JNI_GetDefaultJavaVMInitArgs not implemented 
                  </li><li>
                     JNI_GetCreatedJavaVMs only returns the JavaVM if the VM was started through JNI or
                     a JNI call that retrieves the JavaVM has already occurred. 
                  </li><li>
                     DestroyJVM is only partially implemented (it waits until there are no more non-daemon
                     Java threads and then returns JNI_ERR). 
                  </li><li>
                     DetachCurrentThread doesn't release monitors held by the thread.</li></ul></li><li>
               Native libraries are never unloaded (because code unloading is not supported).</li></ul></li>
          <li>
         The JVM allows any reference type to be passed where an interface reference is expected
         (and to store any reference type in an interface reference type field), on IKVM this
         results in an IncompatibleClassChangeError. 
      </li>
          <li>
         monitorenter / monitorexit cannot be used on unitialized this reference. 
      </li>
          <li>
         Floating point is not fully spec compliant. 
      </li>
          <li>
         A method returning a boolean that returns an integer other than 0 or 1 behaves differently
         (this also applies to byte/char/short and for method parameters). 
      </li>
          <li>
         Synchronized blocks are not async exception safe. 
      </li>
          <li>
         Ghost arrays don't throw ArrayStoreException when you store an object that doesn't
         implement the ghost interface. 
      </li>
          <li>
         Class loading is more eager than on the reference VM. 
      </li>
          <li>
         Interface implementation methods are never really final (interface can be reimplemented
         by .NET subclasses). 
      </li>
          <li>
         JSR-133 finalization spec change is not fully implemented. The JSR-133 changes dictate
         that an object should not be finalized unless the Object constructor has run successfully,
         but this isn't implemented.</li>
          <li>
            <a href="http://openjdk.java.net/projects/jdk7/features/#fa535991">Strict class-file
         checking</a> is not implemented.</li>
        </ul>
        <p>
          <b>Static Compiler (ikvmc)</b>
        </p>
        <ul>
          <li>
         Some subtle differences with ikvmc compiled code for public members inherited from
         non-public base classes (so called "access stubs"). Because the access stub lives
         in a derived class, when accessing a member in a base class, the derived cctor will
         be run whereas java (and ikvm) only runs the base cctor. 
      </li>
          <li>
         Try blocks around base class ctor invocation result in unverifiable code (no known
         compilers produce this type of code). 
      </li>
          <li>
         Try/catch blocks before base class ctor invocation result in unverifiable code (this
         actually happens with the Eclipse compiler when you pass a class literal to the base
         class ctor and compile with -target 1.4). 
      </li>
          <li>
         Only code compiled together during a single compilation fully obeys the JLS binary
         compatibility rules. 
      </li>
        </ul>
        <p>
          <b>Class Library</b>
        </p>
        <p>
      Most class library code is based on OpenJDK 7 build 147. Below is a list of divergences
      and IKVM.NET specific implementation notes.
   </p>
        <table cellspacing="0">
          <tbody>
            <tr>
              <td style="BORDER-TOP: black 1px solid">
               com.sun.security.auth.module        
            </td>
              <td style="BORDER-TOP: black 1px solid">
               Not supported.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               java.applet</td>
              <td>
               Not implemented.</td>
            </tr>
            <tr>
              <td>
               java.awt</td>
              <td>
               Partial System.Windows.Forms based back-end. Not supported.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               java.io.Console</td>
              <td>
               Not implemented.</td>
            </tr>
            <tr>
              <td>
               java.lang.instrument</td>
              <td>
               Not implemented.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               java.lang.management</td>
              <td>
               Limited implementation.</td>
            </tr>
            <tr>
              <td>
               java.net</td>
              <td>
                <a href="http://openjdk.java.net/projects/jdk7/features/#f405">SCTP</a> and <a href="http://openjdk.java.net/projects/jdk7/features/#f639">SDP</a> not
               implemented.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               java.net.ProxySelector</td>
              <td>
               Getting the default system proxy for a URL is not implemented.</td>
            </tr>
            <tr>
              <td>
               java.nio.file</td>
              <td>
               Most optional features (e.g. ACLs) are not implemented.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               java.text.Bidi</td>
              <td>
               Not supported.</td>
            </tr>
            <tr>
              <td>
               java.util.zip</td>
              <td>
               Partially based on GNU Classpath implementation.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               javax.crypto</td>
              <td>
                <a href="http://openjdk.java.net/projects/jdk7/features/#f73">ECC</a> is not implemented.</td>
            </tr>
            <tr>
              <td>
               javax.imageio.plugins.jpeg</td>
              <td>
               Partial implementation. JPEGs can be read and written and there is limited metadata
               support.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               javax.management</td>
              <td>
               Limited implementation.</td>
            </tr>
            <tr>
              <td>
               javax.print</td>
              <td>
               There is a Win32 specific printing implementation. Not supported.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               javax.script</td>
              <td>
               ECMAScript implementation is not included.</td>
            </tr>
            <tr>
              <td>
               javax.smartcardio</td>
              <td>
               Not implemented.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               javax.sound</td>
              <td>
               Not implemented.</td>
            </tr>
            <tr>
              <td>
               javax.swing</td>
              <td>
               Not supported.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               javax.tools</td>
              <td>
               Not supported.</td>
            </tr>
            <tr>
              <td>
               org.ietfs.jgss</td>
              <td>
               Not implemented.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td>
               sun.jdbc.odbc</td>
              <td>
               Implementation based on .NET ODBC managed provider.</td>
            </tr>
            <tr>
              <td>
               sun.net.www.content.audio</td>
              <td>
               Audio content handlers not implemented.</td>
            </tr>
            <tr bgcolor="#f0f0f0">
              <td style="BORDER-BOTTOM: black 1px solid">
               sun.net.www.content.image</td>
              <td style="BORDER-BOTTOM: black 1px solid">
               Not supported.</td>
            </tr>
          </tbody>
        </table>
        <p>
      The entire public API is available, so "Not implemented." for javax.smartcardio, for
      example, means that the API is there but there is no back-end to provide the actual
      smartcard communication support. "Not supported." means that the code is there and
      probably works at least somewhat, but that I'm less likely to fix bugs reported in
      these areas, but patches are welcome, of course.
   </p>
        <p>
      Specific API notes:
   </p>
        <ul>
          <li>
         java.lang.Thread.stop(Throwable t) doesn't support throwing arbitrary exceptions on
         other threads (only java.lang.ThreadDeath). 
      </li>
          <li>
         java.lang.Thread.holdsLock(Object o) causes a spurious notify on the object (this
         is allowed by the J2SE 5.0 spec). 
      </li>
          <li>
         java.lang.String.intern() strings are never garbage collected. 
      </li>
          <li>
         Weak/soft references and reference queues are inefficient and do not fully implement
         the required semantics. 
      </li>
          <li>
         java.lang.ref.SoftReference: Soft references are not guaranteed to be cleared before
         an OutOfMemoryError is thrown. 
      </li>
          <li>
         Threads started outside of Java aren't "visible" (e.g. in ThreadGroup.enumerate())
         until they first call Thread.currentThread(). 
      </li>
          <li>
         java.lang.Thread.getState() returns WAITING or TIMED_WAITING instead of BLOCKING when
         we're inside Object.wait() and blocking to re-acquire the monitor. 
      </li>
          <li>
         java.nio.channel.FileChannel.lock() shared locks are only supported on Windows NT
         derived operating systems. 
      </li>
          <li>
         java.lang.SecurityManager: Deprecated methods not implemented: classDepth(String),
         inClass(String), classLoaderDepth(), currentLoadedClass(), currentClassLoader(), inClassLoader()</li>
        </ul>
        <p>
          <b>Supported Platforms</b>
        </p>
        <p>
      This release has been tested on the following CLI implementations / platforms:
   </p>
        <table border="0">
          <tbody>
            <tr>
              <td>
                <b>CLI Implementation       </b>
              </td>
              <td>
                <b>Architecture      </b>
              </td>
              <td>
                <b>Operating System</b>
              </td>
            </tr>
            <tr>
              <td>
               .NET 2.0 SP2</td>
              <td>
               x86</td>
              <td>
               Windows</td>
            </tr>
            <tr>
              <td>
               .NET 2.0 SP2</td>
              <td>
               x64</td>
              <td>
               Windows</td>
            </tr>
            <tr>
              <td>
               .NET 4.0</td>
              <td>
               x86</td>
              <td>
               Windows</td>
            </tr>
            <tr>
              <td>
               .NET 4.0</td>
              <td>
               x64</td>
              <td>
               Windows</td>
            </tr>
          </tbody>
        </table>
        <p>
          <br />
          <b>Partial Trust</b>
        </p>
        <p>
      There is experimental support for running in partial trust.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=692505a6-f9e7-45ec-90b9-ec7a75d3b509" />
      </body>
      <title>IKVM.NET 7.0 Released</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</link>
      <pubDate>Mon, 05 Dec 2011 06:56:27 GMT</pubDate>
      <description>&lt;p&gt;
   I've released&amp;nbsp;&lt;a href="https://sourceforge.net/projects/ikvm/files/ikvm/7.0.4335.0/"&gt;IKVM.NET
   7.0&lt;/a&gt; to SourceForge. The binaries are identical to the ones in &lt;a href="/PermaLink.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0"&gt;release
   candidate 0&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
   &lt;b&gt;Release Notes&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
   This document lists the improvements, known issues and incompatibilities.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;What's New&lt;/strong&gt; (relative to &lt;a href="/PermaLink.aspx?guid=94934445-9b06-4a81-b76b-fcd23d4f6ec2"&gt;IKVM.NET
   0.46&lt;/a&gt;):
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Integrated OpenJDK 7 b147. 
   &lt;/li&gt;
   &lt;li&gt;
      Implemented Java 7 JVM changes. 
   &lt;/li&gt;
   &lt;li&gt;
      Java annotations on statically compiled code are now returned as java.lang.reflect.Proxy
      objects for compability with broken code that assumes this is always the case. 
   &lt;/li&gt;
   &lt;li&gt;
      Added delegate conversion for java.lang.reflect.InvocationHandler to ikvm.runtime.Delegates. 
   &lt;/li&gt;
   &lt;li&gt;
      Various remap file improvements. 
   &lt;/li&gt;
   &lt;li&gt;
      Changed build and JNI code to use different names for the Windows x86 and x64 versions
      of the native dll. 
   &lt;/li&gt;
   &lt;li&gt;
      Retain reflection field ordering for ikvmc compiled code (not required by spec, but
      to improve compatibility with broken code). 
   &lt;/li&gt;
   &lt;li&gt;
      Various AWT fixes. 
   &lt;/li&gt;
   &lt;li&gt;
      Interop between &lt;a href="/PermaLink.aspx?guid=de964df2-d54f-455b-8ec6-5288bbb4b532"&gt;java.lang.AutoCloseable&lt;/a&gt; and
      System.IDisposable. 
   &lt;/li&gt;
   &lt;li&gt;
      Various build system improvements. 
   &lt;/li&gt;
   &lt;li&gt;
      Added ikvmc -warnaserror option. 
   &lt;/li&gt;
   &lt;li&gt;
      Fixed java.io.FileOutputStream in append mode to use atomic append. 
   &lt;/li&gt;
   &lt;li&gt;
      Various performance improvements. 
   &lt;/li&gt;
   &lt;li&gt;
      Added -Xnoglobbing option to ikvm.exe. 
   &lt;/li&gt;
   &lt;li&gt;
      Various minor fixes. 
   &lt;/li&gt;
   &lt;li&gt;
      Implemented dual stack sockets (Windows Vista and up only). 
   &lt;/li&gt;
   &lt;li&gt;
      Implemented platform MBean server. 
   &lt;/li&gt;
   &lt;li&gt;
      Implemented SocketChannel.sendOutOfBandData(). 
   &lt;/li&gt;
   &lt;li&gt;
      Implemented DatagramChannel multicast methods. 
   &lt;/li&gt;
   &lt;li&gt;
      Removed mapping of System.Security.VerificationException to java.lang.VerifyError. 
   &lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Massive enhancements to support a very large portion of the managed
      PE capabilities (much more than System.Reflection.Emit).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &lt;b&gt;Runtime&lt;/b&gt;
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Code unloading (aka class GC) is not supported. 
   &lt;li&gt;
      In Java static initializers can deadlock, on .NET some threads can see uninitialized
      state in cases where deadlock would occur on the JVM. 
   &lt;li&gt;
      JNI&lt;br&gt;
      &amp;nbsp; 
      &lt;ul&gt;
         &lt;li&gt;
            Only supported in the default AppDomain. 
         &lt;li&gt;
            Only the JNICALL calling convention is supported! (On Windows, HotSpot appears to
            also support the cdecl calling convention). 
         &lt;li&gt;
            Cannot call string contructors on already existing string instances 
         &lt;li&gt;
            A few limitations in Invocation API support&lt;br&gt;
            &amp;nbsp; 
            &lt;ul&gt;
               &lt;li&gt;
                  The Invocation API is only supported when running on .NET. 
               &lt;li&gt;
                  JNI_CreateJavaVM: init options "-verbose[:class|:gc|:jni]", "vfprintf", "exit" and
                  "abort" are not implemented. The JDK 1.1 version of JavaVMInitArgs isn't supported. 
               &lt;li&gt;
                  JNI_GetDefaultJavaVMInitArgs not implemented 
               &lt;li&gt;
                  JNI_GetCreatedJavaVMs only returns the JavaVM if the VM was started through JNI or
                  a JNI call that retrieves the JavaVM has already occurred. 
               &lt;li&gt;
                  DestroyJVM is only partially implemented (it waits until there are no more non-daemon
                  Java threads and then returns JNI_ERR). 
               &lt;li&gt;
                  DetachCurrentThread doesn't release monitors held by the thread.&lt;/li&gt;
            &lt;/ul&gt;
         &lt;li&gt;
            Native libraries are never unloaded (because code unloading is not supported).&lt;/li&gt;
      &lt;/ul&gt;
   &lt;li&gt;
      The JVM allows any reference type to be passed where an interface reference is expected
      (and to store any reference type in an interface reference type field), on IKVM this
      results in an IncompatibleClassChangeError. 
   &lt;li&gt;
      monitorenter / monitorexit cannot be used on unitialized this reference. 
   &lt;li&gt;
      Floating point is not fully spec compliant. 
   &lt;li&gt;
      A method returning a boolean that returns an integer other than 0 or 1 behaves differently
      (this also applies to byte/char/short and for method parameters). 
   &lt;li&gt;
      Synchronized blocks are not async exception safe. 
   &lt;li&gt;
      Ghost arrays don't throw ArrayStoreException when you store an object that doesn't
      implement the ghost interface. 
   &lt;li&gt;
      Class loading is more eager than on the reference VM. 
   &lt;li&gt;
      Interface implementation methods are never really final (interface can be reimplemented
      by .NET subclasses). 
   &lt;li&gt;
      JSR-133 finalization spec change is not fully implemented. The JSR-133 changes dictate
      that an object should not be finalized unless the Object constructor has run successfully,
      but this isn't implemented.&lt;/li&gt;
   &lt;li&gt;
      &lt;a href="http://openjdk.java.net/projects/jdk7/features/#fa535991"&gt;Strict class-file
      checking&lt;/a&gt; is not implemented.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &lt;b&gt;Static Compiler (ikvmc)&lt;/b&gt;
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Some subtle differences with ikvmc compiled code for public members inherited from
      non-public base classes (so called "access stubs"). Because the access stub lives
      in a derived class, when accessing a member in a base class, the derived cctor will
      be run whereas java (and ikvm) only runs the base cctor. 
   &lt;li&gt;
      Try blocks around base class ctor invocation result in unverifiable code (no known
      compilers produce this type of code). 
   &lt;li&gt;
      Try/catch blocks before base class ctor invocation result in unverifiable code (this
      actually happens with the Eclipse compiler when you pass a class literal to the base
      class ctor and compile with -target 1.4). 
   &lt;li&gt;
      Only code compiled together during a single compilation fully obeys the JLS binary
      compatibility rules. 
   &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &lt;b&gt;Class Library&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
   Most class library code is based on OpenJDK 7 build 147. Below is a list of divergences
   and IKVM.NET specific implementation notes.
&lt;/p&gt;
&lt;table cellspacing=0&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td style="BORDER-TOP: black 1px solid"&gt;
            com.sun.security.auth.module&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
         &lt;/td&gt;
         &lt;td style="BORDER-TOP: black 1px solid"&gt;
            Not supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            java.applet&lt;/td&gt;
         &lt;td&gt;
            Not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            java.awt&lt;/td&gt;
         &lt;td&gt;
            Partial System.Windows.Forms based back-end. Not supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            java.io.Console&lt;/td&gt;
         &lt;td&gt;
            Not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            java.lang.instrument&lt;/td&gt;
         &lt;td&gt;
            Not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            java.lang.management&lt;/td&gt;
         &lt;td&gt;
            Limited implementation.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            java.net&lt;/td&gt;
         &lt;td&gt;
            &lt;a href="http://openjdk.java.net/projects/jdk7/features/#f405"&gt;SCTP&lt;/a&gt; and &lt;a href="http://openjdk.java.net/projects/jdk7/features/#f639"&gt;SDP&lt;/a&gt; not
            implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            java.net.ProxySelector&lt;/td&gt;
         &lt;td&gt;
            Getting the default system proxy for a URL is not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            java.nio.file&lt;/td&gt;
         &lt;td&gt;
            Most optional features (e.g. ACLs) are not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            java.text.Bidi&lt;/td&gt;
         &lt;td&gt;
            Not supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            java.util.zip&lt;/td&gt;
         &lt;td&gt;
            Partially based on GNU Classpath implementation.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            javax.crypto&lt;/td&gt;
         &lt;td&gt;
            &lt;a href="http://openjdk.java.net/projects/jdk7/features/#f73"&gt;ECC&lt;/a&gt; is not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            javax.imageio.plugins.jpeg&lt;/td&gt;
         &lt;td&gt;
            Partial implementation. JPEGs can be read and written and there is limited metadata
            support.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            javax.management&lt;/td&gt;
         &lt;td&gt;
            Limited implementation.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            javax.print&lt;/td&gt;
         &lt;td&gt;
            There is a Win32 specific printing implementation. Not supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            javax.script&lt;/td&gt;
         &lt;td&gt;
            ECMAScript implementation is not included.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            javax.smartcardio&lt;/td&gt;
         &lt;td&gt;
            Not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            javax.sound&lt;/td&gt;
         &lt;td&gt;
            Not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            javax.swing&lt;/td&gt;
         &lt;td&gt;
            Not supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            javax.tools&lt;/td&gt;
         &lt;td&gt;
            Not supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            org.ietfs.jgss&lt;/td&gt;
         &lt;td&gt;
            Not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td&gt;
            sun.jdbc.odbc&lt;/td&gt;
         &lt;td&gt;
            Implementation based on .NET ODBC managed provider.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            sun.net.www.content.audio&lt;/td&gt;
         &lt;td&gt;
            Audio content handlers not implemented.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr bgcolor=#f0f0f0&gt;
         &lt;td style="BORDER-BOTTOM: black 1px solid"&gt;
            sun.net.www.content.image&lt;/td&gt;
         &lt;td style="BORDER-BOTTOM: black 1px solid"&gt;
            Not supported.&lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
   The entire public API is available, so "Not implemented." for javax.smartcardio, for
   example, means that the API is there but there is no back-end to provide the actual
   smartcard communication support. "Not supported." means that the code is there and
   probably works at least somewhat, but that I'm less likely to fix bugs reported in
   these areas, but patches are welcome, of course.
&lt;/p&gt;
&lt;p&gt;
   Specific API notes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      java.lang.Thread.stop(Throwable t) doesn't support throwing arbitrary exceptions on
      other threads (only java.lang.ThreadDeath). 
   &lt;li&gt;
      java.lang.Thread.holdsLock(Object o) causes a spurious notify on the object (this
      is allowed by the J2SE 5.0 spec). 
   &lt;li&gt;
      java.lang.String.intern() strings are never garbage collected. 
   &lt;li&gt;
      Weak/soft references and reference queues are inefficient and do not fully implement
      the required semantics. 
   &lt;li&gt;
      java.lang.ref.SoftReference: Soft references are not guaranteed to be cleared before
      an OutOfMemoryError is thrown. 
   &lt;li&gt;
      Threads started outside of Java aren't "visible" (e.g. in ThreadGroup.enumerate())
      until they first call Thread.currentThread(). 
   &lt;li&gt;
      java.lang.Thread.getState() returns WAITING or TIMED_WAITING instead of BLOCKING when
      we're inside Object.wait() and blocking to re-acquire the monitor. 
   &lt;li&gt;
      java.nio.channel.FileChannel.lock() shared locks are only supported on Windows NT
      derived operating systems. 
   &lt;li&gt;
      java.lang.SecurityManager: Deprecated methods not implemented: classDepth(String),
      inClass(String), classLoaderDepth(), currentLoadedClass(), currentClassLoader(), inClassLoader()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &lt;b&gt;Supported Platforms&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
   This release has been tested on the following CLI implementations / platforms:
&lt;/p&gt;
&lt;table border=0&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td&gt;
            &lt;b&gt;CLI Implementation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/td&gt;
         &lt;td&gt;
            &lt;b&gt;Architecture&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/td&gt;
         &lt;td&gt;
            &lt;b&gt;Operating System&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            .NET 2.0 SP2&lt;/td&gt;
         &lt;td&gt;
            x86&lt;/td&gt;
         &lt;td&gt;
            Windows&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            .NET 2.0 SP2&lt;/td&gt;
         &lt;td&gt;
            x64&lt;/td&gt;
         &lt;td&gt;
            Windows&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            .NET 4.0&lt;/td&gt;
         &lt;td&gt;
            x86&lt;/td&gt;
         &lt;td&gt;
            Windows&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            .NET 4.0&lt;/td&gt;
         &lt;td&gt;
            x64&lt;/td&gt;
         &lt;td&gt;
            Windows&lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
   &lt;br&gt;
   &lt;b&gt;Partial Trust&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
   There is experimental support for running in partial trust.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=692505a6-f9e7-45ec-90b9-ec7a75d3b509"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=692505a6-f9e7-45ec-90b9-ec7a75d3b509</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      In today's snapshot I also added support for function pointer types. The CLI supports
      both managed and unmanaged function pointer types, however both are unverifiable.
   </p>
        <p>
      Here's a small C++/CLI example of using a managed function pointer type (in the call
      method signature):
   </p>
        <p>
          <code>void func() {<br />
        System::Console::WriteLine("Hello from Func");<br />
      }<br /><br />
      void call(void (*p)()) {<br />
        p();<br />
      }<br /><br />
      void main() {<br />
        call(func);<br />
      }</code>
        </p>
        <p>
      Compile this with <code>cl /clr:pure test.cpp</code> and the resulting test.exe will
      be a managed PE file with these three methods (and a lot of other junk).
   </p>
        <p>
      Here's an IKVM.Reflection example to create an equivalent foo.exe (without the extra
      junk):
   </p>
        <p>
          <code>using System;<br />
      using IKVM.Reflection;<br />
      using IKVM.Reflection.Emit;<br />
      using Type = IKVM.Reflection.Type;<br /><br />
      class Program {<br />
        public static void Main() {<br />
          var u = new Universe();<br />
          var ab = u.DefineDynamicAssembly(new AssemblyName("Foo"), AssemblyBuilderAccess.Save);<br />
          var modb = ab.DefineDynamicModule("Foo", "Foo.exe");<br />
          
      <br />
          var mb2 = modb.DefineGlobalMethod("func", MethodAttributes.Static,
      null, null);<br />
          var ilgen = mb2.GetILGenerator();<br />
          ilgen.EmitWriteLine("Hello from Func");<br />
          ilgen.Emit(OpCodes.Ret);<br />
          
      <br />
          Type func = u.MakeFunctionPointer(u.MakeStandAloneMethodSig(CallingConventions.Standard,
      null, default(CustomModifiers), null, null, null));<br />
          
      <br />
          var mb3 = modb.DefineGlobalMethod("call", MethodAttributes.Static,
      null, new Type[] { func });<br />
          ilgen = mb3.GetILGenerator();<br />
          ilgen.Emit(OpCodes.Ldarg_0);<br />
          ilgen.__EmitCalli(OpCodes.Calli, func.__MethodSignature);<br />
          ilgen.Emit(OpCodes.Ret);<br />
          
      <br />
          var mb1 = modb.DefineGlobalMethod("main", MethodAttributes.Static,
      null, null);<br />
          ilgen = mb1.GetILGenerator();<br />
          ilgen.Emit(OpCodes.Ldftn, mb2);<br />
          ilgen.Emit(OpCodes.Call, mb3);<br />
          ilgen.Emit(OpCodes.Ret);<br />
          
      <br />
          modb.CreateGlobalFunctions();<br />
          ab.SetEntryPoint(mb1);<br />
          ab.Save("Foo.exe");<br />
        }<br />
      } </code>
        </p>
        <p>
      (I should point out that this won't work with today's snapshot, because while writing
      this I discovered that I had incorrectly added a static Create() method to __StandAloneMethodSig,
      but that should instead be an instance method on Universe.)
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=cc8a8bf9-3451-42cc-8f95-2b201078cb16" />
      </body>
      <title>Function Pointer Types</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</link>
      <pubDate>Fri, 02 Dec 2011 08:43:53 GMT</pubDate>
      <description>&lt;p&gt;
   In today's snapshot I also added support for function pointer types. The CLI supports
   both managed and unmanaged function pointer types, however both are unverifiable.
&lt;/p&gt;
&lt;p&gt;
   Here's a small C++/CLI example of using a managed function pointer type (in the call
   method&amp;nbsp;signature):
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;void func() {&lt;br&gt;
   &amp;nbsp; System::Console::WriteLine("Hello from Func");&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   void call(void (*p)()) {&lt;br&gt;
   &amp;nbsp; p();&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   void main() {&lt;br&gt;
   &amp;nbsp; call(func);&lt;br&gt;
   }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   Compile this with &lt;code&gt;cl /clr:pure test.cpp&lt;/code&gt; and the resulting test.exe will
   be a managed PE file with these three methods (and a lot of other junk).
&lt;/p&gt;
&lt;p&gt;
   Here's an IKVM.Reflection example to create an equivalent foo.exe (without the extra
   junk):
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;using System;&lt;br&gt;
   using IKVM.Reflection;&lt;br&gt;
   using IKVM.Reflection.Emit;&lt;br&gt;
   using Type = IKVM.Reflection.Type;&lt;br&gt;
   &lt;br&gt;
   class Program {&lt;br&gt;
   &amp;nbsp; public static void Main() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var u = new Universe();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var ab = u.DefineDynamicAssembly(new AssemblyName("Foo"), AssemblyBuilderAccess.Save);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var modb = ab.DefineDynamicModule("Foo", "Foo.exe");&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; 
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var mb2 = modb.DefineGlobalMethod("func", MethodAttributes.Static,
   null, null);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var ilgen = mb2.GetILGenerator();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.EmitWriteLine("Hello from Func");&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.Emit(OpCodes.Ret);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; 
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; Type func = u.MakeFunctionPointer(u.MakeStandAloneMethodSig(CallingConventions.Standard,
   null, default(CustomModifiers), null, null, null));&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; 
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var mb3 = modb.DefineGlobalMethod("call", MethodAttributes.Static,
   null, new Type[] { func });&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen = mb3.GetILGenerator();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.Emit(OpCodes.Ldarg_0);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.__EmitCalli(OpCodes.Calli, func.__MethodSignature);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.Emit(OpCodes.Ret);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; 
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; var mb1 = modb.DefineGlobalMethod("main", MethodAttributes.Static,
   null, null);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen = mb1.GetILGenerator();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.Emit(OpCodes.Ldftn, mb2);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.Emit(OpCodes.Call, mb3);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ilgen.Emit(OpCodes.Ret);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; 
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; modb.CreateGlobalFunctions();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ab.SetEntryPoint(mb1);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; ab.Save("Foo.exe");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   } &lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   (I should point out that this won't work with today's snapshot, because while writing
   this I discovered that I had incorrectly added a static Create() method to __StandAloneMethodSig,
   but that should instead be an instance method on Universe.)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=cc8a8bf9-3451-42cc-8f95-2b201078cb16"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=cc8a8bf9-3451-42cc-8f95-2b201078cb16</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=1a216033-1b46-4c82-afe7-41cde284e948</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=1a216033-1b46-4c82-afe7-41cde284e948</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=1a216033-1b46-4c82-afe7-41cde284e948</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1a216033-1b46-4c82-afe7-41cde284e948</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      As I wrote earlier today, the theme of today's snapshot is custom modifiers, but I
      decided to expand a bit on that, since they are a relatively unknown feature of .NET.
   </p>
        <p>
      In the <a href="/PermaLink.aspx?guid=82">early days</a> of IKVM.NET I ran into the
      problem that some Java types must be erased in .NET signatures. An example are arrays
      of what I call ghost types. Fortunately these are not very common, but here's an example
      method:
   </p>
        <p>
          <code>void foo(CharSequence[] array) { }</code>
        </p>
        <p>
      When this is compiled with ikvmc, you end up with something like this:
   </p>
        <p>
          <code>[NameSig("foo", "([Ljava.lang.CharSequence;)V")]<br />
      void foo(object[] array) { }</code>
        </p>
        <p>
      If the class happened to already have a foo method with that signature, the method
      name would be mangled with a numerical suffix (e.g. foo_0).
   </p>
        <p>
      Now, instead of adding a custom attribute and using name mangling, .NET has a much
      better solution for this. Custom modifiers, but unfortunately you couldn't use them
      via .NET's System.Reflection.Emit API back in the .NET 1.x days.
   </p>
        <p>
      When .NET 2.0 came around they added (some) support for custom modifiers, but it both
      had some issues and by then I already had a working solution, so there was not much
      need for changing the implementation. The one exception was in constructor signatures,
      since there you cannot mangle the method name, you have to rely on the signature types
      to make the signature unique, so there I did add custom modifiers when necessary to
      make sure the signatures are unique.
   </p>
        <p>
      In today's snapshot I've changed fields and constructors to always use custom modifiers
      (when necessary) and removed the usage of the NameSigAttribute. Methods still need
      to be done.
   </p>
        <p>
      Here's an example with two constructors that end up with the same signatures:
   </p>
        <p>
          <code>public class Test {<br />
        public Test(Object obj) { }<br />
        public Test(cli.System.Object obj) { }<br />
      }</code>
        </p>
        <p>
      When you compile this with ikvmc, you get something like this:
   </p>
        <p>
          <code>public class Test {<br />
        public Test(object obj) { }<br />
        public Test(object modopt(object) obj) { }<br />
      }</code>
        </p>
        <p>
      The modopt(object) construct here stands for an optional custom modifier of type object.
      When this class is encountered by IKVM (reflection or ikvmc) it can recover the original
      Java types based on the signature and custom modifier. When you use this class from
      C#, the C# compiler will prefer the constructor without the custom modifier, so you
      can still use the class. The cli.System.Object overload is not useable from C#, but
      when there is no signature conflict, C# will also allow you to use the version with
      the custom modifier. So it allows for nice cross language interop (especially given
      how unlikely all these scenarios are).
   </p>
        <p>
      As I said, I haven't done methods yet, but I did experiment a little to see if C#
      interop would work. I was especially concerned about overriding/implementing methods
      with a custom modifier in the signature, but the .NET C# compiler supports this pretty
      well. The Mono C# compiler does not yet have support for this. Only when you have
      two or more abstract methods with the same signature, you can run into a problem.
      For base classes with "duplicate" abstract methods, the C# compiler will not allow
      you to subclass that class, but you can implement interfaces with "duplicate" methods
      and in that case the C# compiler will emit bridge methods for all signatures that
      call into your (necessarily) single implemenation method.
   </p>
        <p>
          <strong>Crazy Stuff</strong>
        </p>
        <p>
      With the new IKVM.Reflection custom modifier support, you can now generate signatures
      that cannot be generated with System.Reflection.Emit. Here's an example of interleaved
      required and optional custom modifiers:
   </p>
        <p>
          <code>var u = new Universe();<br />
      var ab = u.DefineDynamicAssembly(new AssemblyName("Foo"), AssemblyBuilderAccess.Save);<br />
      var modb = ab.DefineDynamicModule("Foo", "Foo.dll");<br />
      var tb = modb.DefineType("FooType", TypeAttributes.Public | TypeAttributes.Abstract);<br />
      tb.DefineDefaultConstructor(MethodAttributes.Public);<br />
      CustomModifiersBuilder mods = new CustomModifiersBuilder();<br />
      mods.AddOptional(u.Import(typeof(object)));<br />
      mods.AddRequired(u.Import(typeof(object)));<br />
      mods.AddOptional(u.Import(typeof(object)));<br />
      var mb = tb.DefineMethod("M", MethodAttributes.Public | MethodAttributes.Abstract
      | MethodAttributes.NewSlot | MethodAttributes.Virtual);<br />
      mb.__SetSignature(null, new CustomModifiers(), new Type[] { u.Import(typeof(int))
      }, new CustomModifiers[] { mods.Create() });<br />
      tb.CreateType();<br />
      ab.Save("Foo.dll");</code>
        </p>
        <p>
      The resulting FooType in Foo.dll contains a method M that cannot be called (or overridden)
      by System.Reflection.Emit generated code. It also can't be used from C#,  but
      that is by design, the C# compiler will not allow you to use any members that have
      required custom modifiers that it doesn't understand (I think that the only required
      custom modifier that it understands is <a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.isvolatile.aspx">IsVolatile</a> on
      fields).
   </p>
        <p>
      Of course, IKVM itself is not very good about dealing with custom modifiers yet. It
      only understands its own custom modifiers, but can get confused when accessing other
      .NET code with custom modifiers.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=1a216033-1b46-4c82-afe7-41cde284e948" />
      </body>
      <title>Custom Modifiers</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=1a216033-1b46-4c82-afe7-41cde284e948</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=1a216033-1b46-4c82-afe7-41cde284e948</link>
      <pubDate>Fri, 02 Dec 2011 07:57:09 GMT</pubDate>
      <description>&lt;p&gt;
   As I wrote earlier today, the theme of today's snapshot is custom modifiers, but I
   decided to expand a bit on that, since they are a relatively unknown feature of .NET.
&lt;/p&gt;
&lt;p&gt;
   In the &lt;a href="/PermaLink.aspx?guid=82"&gt;early days&lt;/a&gt; of IKVM.NET I ran into the
   problem that some Java types must be erased in .NET signatures. An example are arrays
   of what I call ghost types. Fortunately these are not very common, but here's an example
   method:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;void foo(CharSequence[] array) { }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   When this is compiled with ikvmc, you end up with something like this:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;[NameSig("foo", "([Ljava.lang.CharSequence;)V")]&lt;br&gt;
   void foo(object[] array) { }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   If the class happened to already have a foo method with that signature, the method
   name would be mangled with a numerical suffix (e.g. foo_0).
&lt;/p&gt;
&lt;p&gt;
   Now, instead of adding a custom attribute and using name mangling, .NET has a much
   better solution for this. Custom modifiers, but unfortunately you couldn't use them
   via .NET's System.Reflection.Emit API back in the .NET 1.x days.
&lt;/p&gt;
&lt;p&gt;
   When .NET 2.0 came around they added (some) support for custom modifiers, but it both
   had some issues and by then I already had a working solution, so there was not much
   need for changing the implementation. The one exception was in constructor signatures,
   since there you cannot mangle the method name, you have to rely on the signature types
   to make the signature unique, so there I did add custom modifiers when necessary to
   make sure the signatures are unique.
&lt;/p&gt;
&lt;p&gt;
   In today's snapshot I've changed fields and constructors to always use custom modifiers
   (when necessary) and removed the usage of the NameSigAttribute. Methods still need
   to be done.
&lt;/p&gt;
&lt;p&gt;
   Here's an example with two constructors that end up with the same signatures:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;public class Test {&lt;br&gt;
   &amp;nbsp; public Test(Object obj) { }&lt;br&gt;
   &amp;nbsp; public Test(cli.System.Object obj) { }&lt;br&gt;
   }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   When you compile this with ikvmc, you get something like this:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;public class Test {&lt;br&gt;
   &amp;nbsp; public Test(object obj) { }&lt;br&gt;
   &amp;nbsp; public Test(object modopt(object) obj) { }&lt;br&gt;
   }&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   The modopt(object) construct here stands for an optional custom modifier of type object.
   When this class is encountered by IKVM (reflection or ikvmc) it can recover the original
   Java types based on the signature and custom modifier. When you use this class from
   C#, the C# compiler will prefer the constructor without the custom modifier, so you
   can still use the class. The cli.System.Object overload is not useable from C#, but
   when there is no signature conflict, C# will also allow you to use the version with
   the custom modifier. So it allows for nice cross language interop (especially given
   how unlikely all these scenarios are).
&lt;/p&gt;
&lt;p&gt;
   As I said, I haven't done methods yet, but I did experiment a little to see if C#
   interop would work. I was especially concerned about overriding/implementing methods
   with a custom modifier in the signature, but the .NET C# compiler supports this pretty
   well. The Mono C# compiler does not yet have support for this. Only when you have
   two or more abstract methods with the same signature, you can run into a problem.
   For base classes with "duplicate" abstract methods, the C# compiler will not allow
   you to subclass that class, but you can implement interfaces with "duplicate" methods
   and in that case the C# compiler will emit bridge methods for all signatures that
   call into your (necessarily) single implemenation method.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Crazy Stuff&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   With the new IKVM.Reflection custom modifier support, you can now generate signatures
   that cannot be generated with System.Reflection.Emit. Here's an example of interleaved
   required and optional custom modifiers:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;var u = new Universe();&lt;br&gt;
   var ab = u.DefineDynamicAssembly(new AssemblyName("Foo"), AssemblyBuilderAccess.Save);&lt;br&gt;
   var modb = ab.DefineDynamicModule("Foo", "Foo.dll");&lt;br&gt;
   var tb = modb.DefineType("FooType", TypeAttributes.Public | TypeAttributes.Abstract);&lt;br&gt;
   tb.DefineDefaultConstructor(MethodAttributes.Public);&lt;br&gt;
   CustomModifiersBuilder mods = new CustomModifiersBuilder();&lt;br&gt;
   mods.AddOptional(u.Import(typeof(object)));&lt;br&gt;
   mods.AddRequired(u.Import(typeof(object)));&lt;br&gt;
   mods.AddOptional(u.Import(typeof(object)));&lt;br&gt;
   var mb = tb.DefineMethod("M", MethodAttributes.Public | MethodAttributes.Abstract
   | MethodAttributes.NewSlot | MethodAttributes.Virtual);&lt;br&gt;
   mb.__SetSignature(null, new CustomModifiers(), new Type[] { u.Import(typeof(int))
   }, new CustomModifiers[] { mods.Create() });&lt;br&gt;
   tb.CreateType();&lt;br&gt;
   ab.Save("Foo.dll");&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   The resulting FooType in Foo.dll contains a method M that cannot be called (or overridden)
   by System.Reflection.Emit generated code. It also can't be used from C#,&amp;nbsp; but
   that is by design, the C# compiler will not allow you to use any members that have
   required custom modifiers that it doesn't understand (I think that the only required
   custom modifier that it understands is &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.isvolatile.aspx"&gt;IsVolatile&lt;/a&gt; on
   fields).
&lt;/p&gt;
&lt;p&gt;
   Of course, IKVM itself is not very good about dealing with custom modifiers yet. It
   only understands its own custom modifiers, but can get confused when accessing other
   .NET code with custom modifiers.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=1a216033-1b46-4c82-afe7-41cde284e948"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=1a216033-1b46-4c82-afe7-41cde284e948</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      The theme of this snapshot is custom modifiers. I've been working on ikvmc to make
      more use of custom modifiers for fields and constructors that have "special" types
      in their signatures and on the IKVM.Reflection side I completly rewrote custom modifier
      handling (unrelated to ikvmc) to allow roundtripping C++/CLI files (minus the unmanaged
      bits, obviously) and support interleaved modreq and modopt sequences.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated version to 7.1.4352.0.</li>
          <li>
         Fixed dynamic mode with class GC enabled to automatically add required InternalsVisibleToAttribute
         to the dynamic assemblies.</li>
          <li>
         Greatly improved access stub generation. Fixed many related bugs.</li>
          <li>
         Fixed ikvmc exception when decoding NameSigAttribute with missing type.</li>
          <li>
         Added ikvm.runtime.Util.getClassFromTypeHandle() overload for classes that represent
         arrays of remapped .NET types and .NET primitives.</li>
          <li>
         Instead of mangling field names and using NameSigAttribute, we now use modopt to modify
         the signature and record the real type.</li>
          <li>
         Removed legacy remap feature that allowed final fields as properties to be defined
         (long time ago this was used for the System.in/out/err fields).</li>
          <li>
         Fixed Graphics2D.clip(null) to not throw an exception for bitmap and print graphics.</li>
          <li>
         Fixed java.nio.file.FileStore for non-accessible drive to throw exception when trying
         to create the FileStore, not when accessing the name() or type() properties.</li>
          <li>
         Stop mangling property names for access stubs (instead we rely on custom modifiers
         to make them unique).</li>
          <li>
         Stop mangling property accessor method names, but use a custom modifier instead.</li>
          <li>
         Generate access stubs for final fields (when -strictfinalfieldsemantics isn't specified).</li>
          <li>
         Fixed ikvmc to not treat informational messages as error when -warnaserror is specified.
         Fix for <a href="https://sourceforge.net/tracker/?func=detail&amp;atid=525264&amp;aid=3443377&amp;group_id=69637">#3443377</a>.</li>
          <li>
         Changed ikvmc to not enforce pre-1.5 class name rules (since HotSpot, by default doesn't
         enforce any naming rules for classes loaded by trusted class loaders). Fix for <a href="https://sourceforge.net/tracker/?func=detail&amp;atid=525264&amp;aid=3443373&amp;group_id=69637">#3443373</a>.</li>
          <li>
         Relax dynamic mode class name validation for trusted class loaders.</li>
          <li>
         Implemented NetToolkit.isModalExclusionTypeSupported() (by always returning false).
         Fix for <a href="https://sourceforge.net/tracker/?func=detail&amp;atid=525264&amp;aid=3441959&amp;group_id=69637">#3441959</a>.</li>
          <li>
         Added extension methods for (almost) all instance methods in Object, String and Throwable
         to ikvm.extensions.ExtensionMethods.</li>
          <li>
         Added ObsoleteAttribute to instancehelper_ methods in remapped types (with a message
         saying that the extension methods should be used).</li>
          <li>
         Added parameter name to Throwable.addSuppressed() in map.xml.</li>
          <li>
         Added -Xverify option to ikvm.exe.</li>
          <li>
         Use custom modifiers (instead of NameSigAttribute) for constructors with mangled types.</li>
          <li>
         When a member with unloadable types in its signature is exposed via reflection, the
         unloadable types should be resolved to actual types.</li>
          <li>
         Mark getSpace0 with SecuritySafeCritical to avoid getting an exception with .NET 4.0
         build.</li>
          <li>
         IKVM.Reflection: Rewrote custom modifier handling to retain ordering.</li>
          <li>
         IKVM.Reflection: Added ConstructorInfo.__ReturnParameter to expose custom modifiers.</li>
          <li>
         IKVM.Reflection: Added __GetCustomModifiers() to various *Info types.</li>
          <li>
         IKVM.Reflection: Added CustomModifiers type to encapsulate a custom modifier sequence.</li>
          <li>
         IKVM.Reflection: Added CustomModifiersBuilder to create a CustomModifiers sequence.</li>
          <li>
         IKVM.Reflection: Marked a number of IKVM.Reflection specific methods Obsolete, because
         they are replaced with method that take CustomModifiers value(s).</li>
          <li>
         IKVM.Reflection: Added support for function pointer types.</li>
          <li>
         IKVM.Reflection: Added support for custom modifiers to StandAloneMethodSig.</li>
          <li>
         IKVM.Reflection: Added custom modifier support in local variable signatures.</li>
          <li>
         IKVM.Reflection: Fixed SignatureHelper to support custom modifiers in method signatures.</li>
          <li>
         IKVM.Reflection: Added new overload of __ResolveOptionalParameterTypes() that supports
         resolving generic type parameters and custom modifiers.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.1.4352.0.zip">ikvmbin-7.1.4352.0.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=a43da8af-f08e-49dc-98f2-66d1c54a3321" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</link>
      <pubDate>Fri, 02 Dec 2011 06:49:54 GMT</pubDate>
      <description>&lt;p&gt;
   The theme of this snapshot is custom modifiers. I've been working on ikvmc to make
   more use of custom modifiers for fields and constructors that have "special" types
   in their signatures and on the IKVM.Reflection side I completly rewrote custom modifier
   handling (unrelated to ikvmc) to allow roundtripping C++/CLI files (minus the unmanaged
   bits, obviously) and support interleaved modreq and modopt sequences.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated version to 7.1.4352.0.&lt;/li&gt;
   &lt;li&gt;
      Fixed dynamic mode with class GC enabled to automatically add required InternalsVisibleToAttribute
      to the dynamic assemblies.&lt;/li&gt;
   &lt;li&gt;
      Greatly improved access stub generation. Fixed many related bugs.&lt;/li&gt;
   &lt;li&gt;
      Fixed ikvmc exception when decoding NameSigAttribute with missing type.&lt;/li&gt;
   &lt;li&gt;
      Added ikvm.runtime.Util.getClassFromTypeHandle() overload for classes that represent
      arrays of remapped .NET types and .NET primitives.&lt;/li&gt;
   &lt;li&gt;
      Instead of mangling field names and using NameSigAttribute, we now use modopt to modify
      the signature and record the real type.&lt;/li&gt;
   &lt;li&gt;
      Removed legacy remap feature that allowed final fields as properties to be defined
      (long time ago this was used for the System.in/out/err fields).&lt;/li&gt;
   &lt;li&gt;
      Fixed Graphics2D.clip(null) to not throw an exception for bitmap and print graphics.&lt;/li&gt;
   &lt;li&gt;
      Fixed java.nio.file.FileStore for non-accessible drive to throw exception when trying
      to create the FileStore, not when accessing the name() or type() properties.&lt;/li&gt;
   &lt;li&gt;
      Stop mangling property names for access stubs (instead we rely on custom modifiers
      to make them unique).&lt;/li&gt;
   &lt;li&gt;
      Stop mangling property accessor method names, but use a custom modifier instead.&lt;/li&gt;
   &lt;li&gt;
      Generate access stubs for final fields (when -strictfinalfieldsemantics isn't specified).&lt;/li&gt;
   &lt;li&gt;
      Fixed ikvmc to not treat informational messages as error when -warnaserror is specified.
      Fix for &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;atid=525264&amp;amp;aid=3443377&amp;amp;group_id=69637"&gt;#3443377&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      Changed ikvmc to not enforce pre-1.5 class name rules (since HotSpot, by default doesn't
      enforce any naming rules for classes loaded by trusted class loaders). Fix for &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;atid=525264&amp;amp;aid=3443373&amp;amp;group_id=69637"&gt;#3443373&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      Relax dynamic mode class name validation for trusted class loaders.&lt;/li&gt;
   &lt;li&gt;
      Implemented NetToolkit.isModalExclusionTypeSupported() (by always returning false).
      Fix for &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;atid=525264&amp;amp;aid=3441959&amp;amp;group_id=69637"&gt;#3441959&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      Added extension methods for (almost) all instance methods in Object, String and Throwable
      to ikvm.extensions.ExtensionMethods.&lt;/li&gt;
   &lt;li&gt;
      Added ObsoleteAttribute to instancehelper_ methods in remapped types (with a message
      saying that the extension methods should be used).&lt;/li&gt;
   &lt;li&gt;
      Added parameter name to Throwable.addSuppressed() in map.xml.&lt;/li&gt;
   &lt;li&gt;
      Added -Xverify option to ikvm.exe.&lt;/li&gt;
   &lt;li&gt;
      Use custom modifiers (instead of NameSigAttribute) for constructors with mangled types.&lt;/li&gt;
   &lt;li&gt;
      When a member with unloadable types in its signature is exposed via reflection, the
      unloadable types should be resolved to actual types.&lt;/li&gt;
   &lt;li&gt;
      Mark getSpace0 with SecuritySafeCritical to avoid getting an exception with .NET 4.0
      build.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Rewrote custom modifier handling to retain ordering.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added ConstructorInfo.__ReturnParameter to expose custom modifiers.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added __GetCustomModifiers() to various *Info types.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added CustomModifiers type to encapsulate a custom modifier sequence.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added CustomModifiersBuilder to create a CustomModifiers sequence.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Marked a number of IKVM.Reflection specific methods Obsolete, because
      they are replaced with method that take CustomModifiers value(s).&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added support for function pointer types.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added support for custom modifiers to StandAloneMethodSig.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added custom modifier support in local variable signatures.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed SignatureHelper to support custom modifiers in method signatures.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Added new overload of __ResolveOptionalParameterTypes() that supports
      resolving generic type parameters and custom modifiers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.1.4352.0.zip"&gt;ikvmbin-7.1.4352.0.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=a43da8af-f08e-49dc-98f2-66d1c54a3321"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=a43da8af-f08e-49dc-98f2-66d1c54a3321</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Hot on the heels of the 7.0 release candidate, the first development snapshot of 7.1.
      The most visible change is a <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=3089748&amp;group_id=69637&amp;atid=525267">new
      feature</a>. The <a href="http://ikvm.cvs.sourceforge.net/viewvc/ikvm/ikvm/classpath/ikvm/lang/DllExport.java?view=markup">ikvm.lang.DllExport</a> annotation
      to export static methods as unmanaged entry points.
   </p>
        <p>
      Here's a crazy example:
   </p>
        <p>
          <code>import ikvm.lang.DllExport;<br />
      import cli.System.Runtime.InteropServices.DllImportAttribute;<br /><br />
      public class test {<br />
        @DllExport(name = "Foo", ordinal = 42)<br />
        static void Dummy() {<br />
          System.out.println("Hello World");<br />
        }<br /><br />
        @DllImportAttribute.Annotation("test.exe")<br />
        static native void Foo();<br /><br />
        public static void main(String[] args) {<br />
          Foo();<br />
        }<br />
      } </code>
        </p>
        <p>
      Compile as follows:
   </p>
        <p>
          <code>ikvmstub mscorlib<br />
      javac -cp \ikvm\lib\ikvm-api.jar;mscorlib.jar test.java 
      <br />
      ikvmc test.class -r:mscorlib -platform:x86</code>
        </p>
        <p>
      The DllExport annotation only works when you explicitly specify -platform:x86 or -platform:x64.
      In the future ARM will also be supported, but I'll need to have an ARM Windows 8 system
      first. Since it emits an unmanaged entry point, the resulting assembly is a platform
      specific <a href="/PermaLink.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7">mixed
      assembly</a>.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated version to 7.1.4336.0. 
      </li>
          <li>
         Added ikvmc warnings for referencing non-primary assembly in shared class loader group
         and duplicate references. 
      </li>
          <li>
         Removed ikvmc -platform:Itanium option. 
      </li>
          <li>
         Added ikvm.lang.DllExport annotation to export static methods as unmanaged exports. 
      </li>
          <li>
         Implemented a different pinning scheme for GetPrimitiveArrayCritical() that tolerates
         broken code that passes back the wrong pointer to Release. Should also perform better
         in most cases. GetStringCritical() now also pins instead of copies. Note that we intentionally
         ignore the mode parameter in ReleasePrimitiveArrayCritical() as HotSpot does the same. 
      </li>
          <li>
         Added include stdarg.h to jni.h make the header file compile by itself. 
      </li>
          <li>
         Added JNI_TRUE and JNI_FALSE to jni.h. 
      </li>
          <li>
         IKVM.Reflection: Fixed various assembly name parsing bugs in managed Fusion CompareAssemblyIdentity. 
      </li>
          <li>
         IKVM.Reflection: Re-implemented (most of) AssemblyName without dependency on System.Reflection.AssemblyName.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.1.4336.zip">ikvmbin-7.1.4336.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=78d507c1-f1e2-4706-9f41-866a34d0a2c0" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</link>
      <pubDate>Tue, 15 Nov 2011 06:25:45 GMT</pubDate>
      <description>&lt;p&gt;
   Hot on the heels of the 7.0 release candidate, the first development snapshot of 7.1.
   The most visible change is a &lt;a href="http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3089748&amp;amp;group_id=69637&amp;amp;atid=525267"&gt;new
   feature&lt;/a&gt;. The &lt;a href="http://ikvm.cvs.sourceforge.net/viewvc/ikvm/ikvm/classpath/ikvm/lang/DllExport.java?view=markup"&gt;ikvm.lang.DllExport&lt;/a&gt; annotation
   to export static methods as unmanaged entry points.
&lt;/p&gt;
&lt;p&gt;
   Here's a crazy example:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;import ikvm.lang.DllExport;&lt;br&gt;
   import cli.System.Runtime.InteropServices.DllImportAttribute;&lt;br&gt;
   &lt;br&gt;
   public class test {&lt;br&gt;
   &amp;nbsp; @DllExport(name = "Foo", ordinal = 42)&lt;br&gt;
   &amp;nbsp; static void Dummy() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("Hello World");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   &lt;br&gt;
   &amp;nbsp; @DllImportAttribute.Annotation("test.exe")&lt;br&gt;
   &amp;nbsp; static native void Foo();&lt;br&gt;
   &lt;br&gt;
   &amp;nbsp; public static void main(String[] args) {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; Foo();&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   }&amp;nbsp;&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   Compile as follows:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;ikvmstub mscorlib&lt;br&gt;
   javac -cp \ikvm\lib\ikvm-api.jar;mscorlib.jar test.java 
   &lt;br&gt;
   ikvmc test.class -r:mscorlib -platform:x86&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   The DllExport annotation only works when you explicitly specify -platform:x86 or -platform:x64.
   In the future ARM will also be supported, but I'll need to have an ARM Windows 8 system
   first. Since it emits an unmanaged entry point, the resulting assembly is a platform
   specific &lt;a href="/PermaLink.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7"&gt;mixed
   assembly&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated version to 7.1.4336.0. 
   &lt;li&gt;
      Added ikvmc warnings for referencing non-primary assembly in shared class loader group
      and duplicate references. 
   &lt;li&gt;
      Removed ikvmc -platform:Itanium option. 
   &lt;li&gt;
      Added ikvm.lang.DllExport annotation to export static methods as unmanaged exports. 
   &lt;li&gt;
      Implemented a different pinning scheme for GetPrimitiveArrayCritical() that tolerates
      broken code that passes back the wrong pointer to Release. Should also perform better
      in most cases. GetStringCritical() now also pins instead of copies. Note that we intentionally
      ignore the mode parameter in ReleasePrimitiveArrayCritical() as HotSpot does the same. 
   &lt;li&gt;
      Added include stdarg.h to jni.h make the header file compile by itself. 
   &lt;li&gt;
      Added JNI_TRUE and JNI_FALSE to jni.h. 
   &lt;li&gt;
      IKVM.Reflection: Fixed various assembly name parsing bugs in managed Fusion CompareAssemblyIdentity. 
   &lt;li&gt;
      IKVM.Reflection: Re-implemented (most of) AssemblyName without dependency on System.Reflection.AssemblyName.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.1.4336.zip"&gt;ikvmbin-7.1.4336.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=78d507c1-f1e2-4706-9f41-866a34d0a2c0"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=78d507c1-f1e2-4706-9f41-866a34d0a2c0</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      The first release candidate is available. No changes (except the version number and strong
      naming) relative to the last development snapshot.
   </p>
        <p>
      What's New (relative to <a href="/PermaLink.aspx?guid=94934445-9b06-4a81-b76b-fcd23d4f6ec2">IKVM.NET
      0.46</a>):
   </p>
        <ul>
          <li>
         Integrated OpenJDK 7 b147. 
      </li>
          <li>
         Implemented Java 7 JVM changes. 
      </li>
          <li>
         Java annotations on statically compiled code are now returned as java.lang.reflect.Proxy
         objects for compability with broken code that assumes this is always the case. 
      </li>
          <li>
         Added delegate conversion for java.lang.reflect.InvocationHandler to ikvm.runtime.Delegates. 
      </li>
          <li>
         Various remap file improvements. 
      </li>
          <li>
         Changed build and JNI code to use different names for the Windows x86 and x64 versions
         of the native dll. 
      </li>
          <li>
         Retain reflection field ordering for ikvmc compiled code (not required by spec, but
         to improve compatibility with broken code). 
      </li>
          <li>
         Various AWT fixes. 
      </li>
          <li>
         Interop between <a href="/PermaLink.aspx?guid=de964df2-d54f-455b-8ec6-5288bbb4b532">java.lang.AutoCloseable</a> and
         System.IDisposable. 
      </li>
          <li>
         Various build system improvements. 
      </li>
          <li>
         Added ikvmc -warnaserror option. 
      </li>
          <li>
         Fixed java.io.FileOutputStream in append mode to use atomic append. 
      </li>
          <li>
         Various performance improvements. 
      </li>
          <li>
         Added -Xnoglobbing option to ikvm.exe. 
      </li>
          <li>
         Various minor fixes. 
      </li>
          <li>
         Implemented dual stack sockets (Windows Vista and up only). 
      </li>
          <li>
         Implemented platform MBean server. 
      </li>
          <li>
         Implemented SocketChannel.sendOutOfBandData(). 
      </li>
          <li>
         Implemented DatagramChannel multicast methods. 
      </li>
          <li>
         Removed mapping of System.Security.VerificationException to java.lang.VerifyError. 
      </li>
          <li>
         IKVM.Reflection: Massive enhancements to support a very large portion of the managed
         PE capabilities (much more than System.Reflection.Emit).</li>
        </ul>
        <p>
      When the final release is done, it will include the full release notes.
   </p>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.0.4335.0.zip">ikvmbin-7.0.4335.0.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-7.0.4335.0.zip">ikvmsrc-7.0.4335.0.zip</a>, <a href="http://www.frijters.net/openjdk7-b147-stripped.zip">openjdk7-b147-stripped.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=0f65c7f6-796d-4b27-97ed-b7b1230842c0" />
      </body>
      <title>IKVM.NET 7.0 Release Candidate 0</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</link>
      <pubDate>Mon, 14 Nov 2011 13:01:32 GMT</pubDate>
      <description>&lt;p&gt;
   The first release candidate is available. No changes (except the version number and&amp;nbsp;strong
   naming)&amp;nbsp;relative to the last development snapshot.
&lt;/p&gt;
&lt;p&gt;
   What's New (relative to &lt;a href="/PermaLink.aspx?guid=94934445-9b06-4a81-b76b-fcd23d4f6ec2"&gt;IKVM.NET
   0.46&lt;/a&gt;):
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Integrated OpenJDK 7 b147. 
   &lt;li&gt;
      Implemented Java 7 JVM changes. 
   &lt;li&gt;
      Java annotations on statically compiled code are now returned as java.lang.reflect.Proxy
      objects for compability with broken code that assumes this is always the&amp;nbsp;case. 
   &lt;li&gt;
      Added delegate conversion for java.lang.reflect.InvocationHandler to ikvm.runtime.Delegates. 
   &lt;li&gt;
      Various remap file improvements. 
   &lt;li&gt;
      Changed build and JNI code to use different names for the Windows x86 and x64 versions
      of the native dll. 
   &lt;li&gt;
      Retain reflection field ordering for ikvmc compiled code (not required by spec, but
      to improve compatibility with broken code). 
   &lt;li&gt;
      Various AWT fixes. 
   &lt;li&gt;
      Interop between &lt;a href="/PermaLink.aspx?guid=de964df2-d54f-455b-8ec6-5288bbb4b532"&gt;java.lang.AutoCloseable&lt;/a&gt; and
      System.IDisposable. 
   &lt;li&gt;
      Various build system improvements. 
   &lt;li&gt;
      Added ikvmc -warnaserror option. 
   &lt;li&gt;
      Fixed java.io.FileOutputStream in append mode to use atomic append. 
   &lt;li&gt;
      Various performance improvements. 
   &lt;li&gt;
      Added -Xnoglobbing option to ikvm.exe. 
   &lt;li&gt;
      Various minor fixes. 
   &lt;li&gt;
      Implemented dual stack sockets (Windows Vista and up only). 
   &lt;li&gt;
      Implemented platform MBean server. 
   &lt;li&gt;
      Implemented SocketChannel.sendOutOfBandData(). 
   &lt;li&gt;
      Implemented DatagramChannel multicast methods. 
   &lt;li&gt;
      Removed mapping of System.Security.VerificationException to java.lang.VerifyError. 
   &lt;li&gt;
      IKVM.Reflection: Massive enhancements to support a very large portion of the managed
      PE capabilities (much more than System.Reflection.Emit).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   When the final release is done, it will include the full release notes.
&lt;/p&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.0.4335.0.zip"&gt;ikvmbin-7.0.4335.0.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-7.0.4335.0.zip"&gt;ikvmsrc-7.0.4335.0.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk7-b147-stripped.zip"&gt;openjdk7-b147-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=0f65c7f6-796d-4b27-97ed-b7b1230842c0"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=0f65c7f6-796d-4b27-97ed-b7b1230842c0</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7c760276-fc97-4b90-9208-5d67797b21a7</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Just a quick blog about the different types of managed PE files.
   </p>
        <p>
      Here's a table:
   </p>
        <table border="1" bordercolor="black">
          <tbody>
            <tr>
              <td>
                <b>Description</b>
              </td>
              <td style="FONT-WEIGHT: 700">
               C# compiler switch</td>
              <td>
                <b>PE type</b>
              </td>
              <td>
                <b>machine</b>
              </td>
              <td>
                <b>corflags</b>
              </td>
            </tr>
            <tr>
              <td>
               MSIL</td>
              <td>
               /platform:anycpu (default)</td>
              <td>
               PE32</td>
              <td>
               x86</td>
              <td>
               ILONLY</td>
            </tr>
            <tr>
              <td>
               MSIL 32 bit preferred</td>
              <td>
               /platform:anycpu32bitpreferred</td>
              <td>
               PE32</td>
              <td>
               x86</td>
              <td>
               ILONLY | 32BITREQUIRED | 32BITPREFERRED</td>
            </tr>
            <tr>
              <td>
               x86 managed</td>
              <td>
               /platform:x86</td>
              <td>
               PE32</td>
              <td>
               x86</td>
              <td>
               ILONLY | 32BITREQUIRED</td>
            </tr>
            <tr>
              <td>
               x86 mixed</td>
              <td>
               n/a</td>
              <td>
               PE32</td>
              <td>
               x86</td>
              <td>
               32BITREQUIRED</td>
            </tr>
            <tr>
              <td>
               x64 managed</td>
              <td>
               /platform:x64</td>
              <td>
               PE32+</td>
              <td>
               x64</td>
              <td>
               ILONLY</td>
            </tr>
            <tr>
              <td>
               x64 mixed</td>
              <td>
               n/a</td>
              <td>
               PE32+</td>
              <td>
               x64</td>
              <td>
                </td>
            </tr>
            <tr>
              <td>
               ARM managed</td>
              <td>
               /platform:arm</td>
              <td>
               PE32</td>
              <td>
               ARM</td>
              <td>
               ILONLY</td>
            </tr>
            <tr>
              <td>
               ARM mixed</td>
              <td>
               n/a</td>
              <td>
               PE32</td>
              <td>
               ARM</td>
              <td>
                </td>
            </tr>
          </tbody>
        </table>
        <p>
      The MSIL 32 bit preferred and ARM types are new in .NET 4.5. I've left out Itanium,
      because it's not that interesting.
   </p>
        <p>
      For legacy reasons pure MSIL files specify x86 as the machine type and when you really
      want to target just x86 you need to set the (confusingly named) COMIMAGE_FLAGS_32BITREQUIRED
      flag.
   </p>
        <p>
      When the COMIMAGE_FLAGS_32BITREQUIRED flag was introduced (back in .NET 1.0) they
      probably intended it to just mean that the image required a 32 bit architecture (not
      necessarily x86), but then the C# compiler mapped the /platform:x86 switch to this
      flag and they were locked into it meaning just x86.
   </p>
        <p>
      Starting with Visual Studio 2010, the default platform target project setting for
      executables changed from Any CPU to x86. This was probably because x64 systems were
      becoming more popular and more people started running into the poor x64 JIT performance
      and its many bugs.
   </p>
        <p>
      With the introduction of ARM support in Windows 8 there was now a need for a new flag
      to avoid the x64 JIT, but still be cross platform, so the COMIMAGE_FLAGS_32BITPREFERRED
      flag was invented. For downward compatibility, this flag is not set by itself, but
      instead modifies the meaning of the COMIMAGE_FLAGS_32BITREQUIRED flag, to allow .NET
      4.0 systems to continue to run the executable in 32 bit mode (they simply ignore the
      new flag) while on ARM systems the system can see that the executable is not x86 specific
      because the new flag is set.
   </p>
        <p>
      Finally, when your PE file contains unmanaged exports the ILONLY flag must not be
      set or the loader will refuse to load the file.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=7c760276-fc97-4b90-9208-5d67797b21a7" />
      </body>
      <title>Managed PE File Types</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7</link>
      <pubDate>Mon, 14 Nov 2011 08:18:51 GMT</pubDate>
      <description>&lt;p&gt;
   Just a quick blog about the different types of managed PE files.
&lt;/p&gt;
&lt;p&gt;
   Here's a table:
&lt;/p&gt;
&lt;table border=1 bordercolor=black&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td&gt;
            &lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;
         &lt;td style="FONT-WEIGHT: 700"&gt;
            C# compiler switch&lt;/td&gt;
         &lt;td&gt;
            &lt;b&gt;PE type&lt;/b&gt;&lt;/td&gt;
         &lt;td&gt;
            &lt;b&gt;machine&lt;/b&gt;&lt;/td&gt;
         &lt;td&gt;
            &lt;b&gt;corflags&lt;/b&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            MSIL&lt;/td&gt;
         &lt;td&gt;
            /platform:anycpu (default)&lt;/td&gt;
         &lt;td&gt;
            PE32&lt;/td&gt;
         &lt;td&gt;
            x86&lt;/td&gt;
         &lt;td&gt;
            ILONLY&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            MSIL 32 bit preferred&lt;/td&gt;
         &lt;td&gt;
            /platform:anycpu32bitpreferred&lt;/td&gt;
         &lt;td&gt;
            PE32&lt;/td&gt;
         &lt;td&gt;
            x86&lt;/td&gt;
         &lt;td&gt;
            ILONLY | 32BITREQUIRED | 32BITPREFERRED&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            x86 managed&lt;/td&gt;
         &lt;td&gt;
            /platform:x86&lt;/td&gt;
         &lt;td&gt;
            PE32&lt;/td&gt;
         &lt;td&gt;
            x86&lt;/td&gt;
         &lt;td&gt;
            ILONLY | 32BITREQUIRED&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            x86 mixed&lt;/td&gt;
         &lt;td&gt;
            n/a&lt;/td&gt;
         &lt;td&gt;
            PE32&lt;/td&gt;
         &lt;td&gt;
            x86&lt;/td&gt;
         &lt;td&gt;
            32BITREQUIRED&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            x64 managed&lt;/td&gt;
         &lt;td&gt;
            /platform:x64&lt;/td&gt;
         &lt;td&gt;
            PE32+&lt;/td&gt;
         &lt;td&gt;
            x64&lt;/td&gt;
         &lt;td&gt;
            ILONLY&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            x64 mixed&lt;/td&gt;
         &lt;td&gt;
            n/a&lt;/td&gt;
         &lt;td&gt;
            PE32+&lt;/td&gt;
         &lt;td&gt;
            x64&lt;/td&gt;
         &lt;td&gt;
            &amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            ARM managed&lt;/td&gt;
         &lt;td&gt;
            /platform:arm&lt;/td&gt;
         &lt;td&gt;
            PE32&lt;/td&gt;
         &lt;td&gt;
            ARM&lt;/td&gt;
         &lt;td&gt;
            ILONLY&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td&gt;
            ARM mixed&lt;/td&gt;
         &lt;td&gt;
            n/a&lt;/td&gt;
         &lt;td&gt;
            PE32&lt;/td&gt;
         &lt;td&gt;
            ARM&lt;/td&gt;
         &lt;td&gt;
            &amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
   The MSIL 32 bit preferred and ARM types are new in .NET 4.5. I've left out Itanium,
   because it's not that interesting.
&lt;/p&gt;
&lt;p&gt;
   For legacy reasons pure MSIL files specify x86 as the machine type and when you really
   want to target just x86 you need to set the (confusingly named) COMIMAGE_FLAGS_32BITREQUIRED
   flag.
&lt;/p&gt;
&lt;p&gt;
   When the COMIMAGE_FLAGS_32BITREQUIRED flag was introduced (back in .NET 1.0) they
   probably intended it to just mean that the image required a 32 bit architecture (not
   necessarily x86), but then the C# compiler mapped the /platform:x86 switch to this
   flag and they were locked into it meaning just x86.
&lt;/p&gt;
&lt;p&gt;
   Starting with Visual Studio 2010, the default platform target project setting for
   executables changed from Any CPU to x86. This was probably because x64 systems were
   becoming more popular and more people started running into the poor x64 JIT performance
   and its many bugs.
&lt;/p&gt;
&lt;p&gt;
   With the introduction of ARM support in Windows 8 there was now a need for a new flag
   to avoid the x64 JIT, but still be cross platform, so the COMIMAGE_FLAGS_32BITPREFERRED
   flag was invented. For downward compatibility, this flag is not set by itself, but
   instead modifies the meaning of the COMIMAGE_FLAGS_32BITREQUIRED flag, to allow .NET
   4.0 systems to continue to run the executable in 32 bit mode (they simply ignore the
   new flag) while on ARM systems the system can see that the executable is not x86 specific
   because the new flag is set.
&lt;/p&gt;
&lt;p&gt;
   Finally, when your PE file contains unmanaged exports the ILONLY flag must not be
   set or the loader will refuse to load the file.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=7c760276-fc97-4b90-9208-5d67797b21a7"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=7c760276-fc97-4b90-9208-5d67797b21a7</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=e1824332-c16f-4f25-b94a-65c3478060bd</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=e1824332-c16f-4f25-b94a-65c3478060bd</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=e1824332-c16f-4f25-b94a-65c3478060bd</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e1824332-c16f-4f25-b94a-65c3478060bd</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I've implemented the JDK 7 method overriding behavior. So this should be the final
      snapshot before the 7.0 release candidate.
   </p>
        <p>
      It's really a testament to the .NET method overriding model that I was able to easily
      implement all the weird JDK 7 behavior without resorting to any hacks. It's a simple
      matter of using <a href="http://msdn.microsoft.com/en-us/library/system.reflection.methodattributes.aspx">MethodAttributes.NewSlot</a> and <a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.typebuilder.definemethodoverride.aspx">TypeBuilder.DefineMethodOverride()</a> in
      the right places.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated LICENSE and THIRD_PARTY_README to OpenJDK 7. Thanks to Martin for pointing
         out in the <a href="/CommentView.aspx?guid=1e97aece-acdd-4d63-bc97-57443a69fa9e">comments</a> this
         was still missing. 
      </li>
          <li>
         Implemented JDK 7 method overriding behavior (minus the <a href="/PermaLink.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586">part
         5</a> bug).</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-7.0.4328.zip">ikvmbin-7.0.4328.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=e1824332-c16f-4f25-b94a-65c3478060bd" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=e1824332-c16f-4f25-b94a-65c3478060bd</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=e1824332-c16f-4f25-b94a-65c3478060bd</link>
      <pubDate>Mon, 07 Nov 2011 06:46:12 GMT</pubDate>
      <description>&lt;p&gt;
   I've implemented the JDK 7 method overriding behavior. So this should be the final
   snapshot before the 7.0 release candidate.
&lt;/p&gt;
&lt;p&gt;
   It's really a testament to the .NET method overriding model that I was able to easily
   implement all the weird JDK 7 behavior without resorting to any hacks. It's a simple
   matter of using &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.methodattributes.aspx"&gt;MethodAttributes.NewSlot&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.typebuilder.definemethodoverride.aspx"&gt;TypeBuilder.DefineMethodOverride()&lt;/a&gt; in
   the right places.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated LICENSE and THIRD_PARTY_README to OpenJDK 7. Thanks to Martin for pointing
      out in the &lt;a href="/CommentView.aspx?guid=1e97aece-acdd-4d63-bc97-57443a69fa9e"&gt;comments&lt;/a&gt; this
      was still missing. 
   &lt;li&gt;
      Implemented JDK 7 method overriding behavior (minus the &lt;a href="/PermaLink.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586"&gt;part
      5&lt;/a&gt; bug).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-7.0.4328.zip"&gt;ikvmbin-7.0.4328.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=e1824332-c16f-4f25-b94a-65c3478060bd"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=e1824332-c16f-4f25-b94a-65c3478060bd</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Parts 1 through 5 described behavior that is new in JDK 7, but there are also pre-existing
      bugs.
   </p>
        <p>
      When you declare a static method as final (which makes no sense and there is no good
      reason this was ever allowed) you disallow a virtual method in a base class from being
      overridden:
   </p>
        <p>
          <code>public class A<br />
      {<br />
        public void foo() {<br />
          System.out.println("A.foo");<br />
        }<br />
      }<br /><br />
      public class B extends A<br />
      {<br />
        public static final void foo() {<br />
          System.out.println("B.foo");<br />
        }<br />
      } 
      <br /><br />
      public class C extends B<br />
      {<br />
        public void foo() {<br />
          System.out.println("C.foo");<br />
        }<br />
      }<br /><br />
      public class test<br />
      {<br />
        public static void main(String[] args) {<br />
          new C();<br />
        }<br />
      } 
      <br /></code>
        </p>
        <p>
      After you compile this (the easiest trick is probably to rename the B.foo method to
      f__ and after you compile use a hex editor to patch the resulting class file) and
      run it, you get:
   </p>
        <p>
          <code>Exception in thread "main" java.lang.VerifyError: class C overrides final method
      foo.()V<br />
              at ...<br /><br /></code>
        </p>
        <p>
      Like I said, this is not new. I also tried this on JDK 1.1 and JDK 1.5 and on 1.1
      behaves as expected and 1.5 has the modern behavior.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=20d36b38-5aa8-47df-bad6-297d02dbeb4f" />
      </body>
      <title>Java Method Overriding Is FUBAR Part 6 of ∞</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</link>
      <pubDate>Mon, 07 Nov 2011 06:12:25 GMT</pubDate>
      <description>&lt;p&gt;
   Parts 1 through 5 described behavior that is new in JDK 7, but there are also pre-existing
   bugs.
&lt;/p&gt;
&lt;p&gt;
   When you declare a static method as final (which makes no sense and there is no good
   reason this was ever allowed) you disallow a virtual method in a base class from being
   overridden:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;public class A&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; public void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("A.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   public class B extends A&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; public static final void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("B.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   } 
   &lt;br&gt;
   &lt;br&gt;
   public class C extends B&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; public void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("C.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   public class test&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; public static void main(String[] args) {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; new C();&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   } 
   &lt;br&gt;
   &lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   After you compile this (the easiest trick is probably to rename the B.foo method to
   f__ and after you compile use a hex editor to patch the resulting class file) and
   run it, you get:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;Exception in thread "main" java.lang.VerifyError: class C overrides final method
   foo.()V&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at ...&lt;br&gt;
   &lt;br&gt;
   &lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   Like I said, this is not new. I also tried this on JDK 1.1 and JDK 1.5 and on 1.1
   behaves as expected and 1.5 has the modern behavior.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=20d36b38-5aa8-47df-bad6-297d02dbeb4f"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=20d36b38-5aa8-47df-bad6-297d02dbeb4f</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f58b4ef6-4077-4f23-a840-b784d28db586</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      One of the bizarre things is that the method overriding behavior changed between Java
      6 and Java 7 (and HotSpot preserves the Java 6 behavior for classes that have major
      class file version &lt; 51), but the spec doesn't mention this at all, where it generally
      is pretty good about mentioning different behavior based on class file version.
   </p>
        <p>
      Here's an example that uses a class hierarchy that mixes version 50 and 51 classes
      to confuse HotSpot JDK 7:
   </p>
        <p>
          <code>package p1;<br /><br />
      public class A<br />
      {<br />
        { foo(); }<br />
        public void foo() {<br />
          System.out.println("A.foo");<br />
        }<br />
        public static void main(String[] args) {<br />
          new p3.F();<br />
        }<br />
      }<br /><br />
      package p2;<br /><br />
      public class B extends p1.A<br />
      {<br />
        { foo(); }<br />
        void foo() {<br />
          System.out.println("B.foo");<br />
        }<br />
      } 
      <br /><br />
      package p3;<br /><br />
      public class C extends p2.B<br />
      {<br />
        { foo(); }<br />
        void foo() {<br />
          System.out.println("C.foo");<br />
        }<br />
      } 
      <br /><br />
      package p4;<br /><br />
      public class D extends p3.C<br />
      {<br />
        { foo(); }<br />
        void foo() {<br />
          System.out.println("D.foo");<br />
        }<br />
      } 
      <br /></code>
        </p>
        <p>
      Here's a table view of the structure:
   </p>
        <p>
          <table>
            <tbody>
              <tr>
                <th>
                  p1  </th>
                <th>
                  p2  </th>
                <th>
                  p3  </th>
                <th>
                  p4</th>
              </tr>
              <tr>
                <td>
                  A</td>
                <td>
                   </td>
                <td>
                   </td>
                <td>
                   </td>
              </tr>
              <tr>
                <td>
                   </td>
                <td>
                  B</td>
                <td>
                   </td>
                <td>
                   </td>
              </tr>
              <tr>
                <td>
                   </td>
                <td>
                   </td>
                <td>
                  C</td>
                <td>
                   </td>
              </tr>
              <tr>
                <td>
                   </td>
                <td>
                   </td>
                <td>
                   </td>
                <td>
                  D</td>
              </tr>
            </tbody>
          </table>
        </p>
        <p>
      After you compile this with javac 7 (again using the trick to first compile without
      the public modifier on A.foo) then use a hex editor to modify p3/C.class to change
      the class file version from 51 (33 hex) to 50 (32 hex) at offset 7 in the file.
   </p>
        <p>
      When you run it you get:
   </p>
        <p>
          <code>D.foo<br />
      D.foo<br />
      Exception in thread "main" java.lang.AbstractMethodError: p3.C.foo()V<br />
              at p3.C.<INIT>
         (C.java:5)<br />
                 at p4.D.<INIT>
            (D.java:3)<br />
                    at p1.A.main(A.java:10)<br /></INIT></INIT></code>
        </p>
        <p>
      (This is a variation of the bug I reported <a href="http://groups.google.com/group/jvm-languages/msg/e2f30228592851e2">here</a>.)
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=f58b4ef6-4077-4f23-a840-b784d28db586" />
      </body>
      <title>Java Method Overriding Is FUBAR Part 5 of ∞</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586</link>
      <pubDate>Fri, 04 Nov 2011 07:54:44 GMT</pubDate>
      <description>&lt;p&gt;
   One of the bizarre things is that the method overriding behavior changed between Java
   6 and Java 7 (and HotSpot preserves the Java 6 behavior for classes that have major
   class file version &amp;lt; 51), but the spec doesn't mention this at all, where it generally
   is pretty good about mentioning different behavior based on class file version.
&lt;/p&gt;
&lt;p&gt;
   Here's an example that uses a class hierarchy that mixes version 50 and 51 classes
   to confuse HotSpot JDK 7:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;package p1;&lt;br&gt;
   &lt;br&gt;
   public class A&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; { foo(); }&lt;br&gt;
   &amp;nbsp; public void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("A.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   &amp;nbsp; public static void main(String[] args) {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; new p3.F();&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   }&lt;br&gt;
   &lt;br&gt;
   package p2;&lt;br&gt;
   &lt;br&gt;
   public class B extends p1.A&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; { foo(); }&lt;br&gt;
   &amp;nbsp; void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("B.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   } 
   &lt;br&gt;
   &lt;br&gt;
   package p3;&lt;br&gt;
   &lt;br&gt;
   public class C extends p2.B&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; { foo(); }&lt;br&gt;
   &amp;nbsp; void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("C.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   } 
   &lt;br&gt;
   &lt;br&gt;
   package p4;&lt;br&gt;
   &lt;br&gt;
   public class D extends p3.C&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp; { foo(); }&lt;br&gt;
   &amp;nbsp; void foo() {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("D.foo");&lt;br&gt;
   &amp;nbsp; }&lt;br&gt;
   } 
   &lt;br&gt;
   &lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   Here's a table view of the structure:
&lt;/p&gt;
&lt;p&gt;
   &lt;table&gt;
      &lt;tbody&gt;
         &lt;tr&gt;
            &lt;th&gt;
               p1&amp;nbsp;&amp;nbsp;&lt;/th&gt;
            &lt;th&gt;
               p2&amp;nbsp;&amp;nbsp;&lt;/th&gt;
            &lt;th&gt;
               p3&amp;nbsp;&amp;nbsp;&lt;/th&gt;
            &lt;th&gt;
               p4&lt;/th&gt;
         &lt;/tr&gt;
         &lt;tr&gt;
            &lt;td&gt;
               A&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
         &lt;/tr&gt;
         &lt;tr&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               B&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
         &lt;/tr&gt;
         &lt;tr&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               C&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
         &lt;/tr&gt;
         &lt;tr&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               &amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
               D&lt;/td&gt;
         &lt;/tr&gt;
      &lt;/tbody&gt;
   &lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;
   After you compile this with javac 7 (again using the trick to first compile without
   the public modifier on A.foo) then use a hex editor to modify p3/C.class to change
   the class file version from 51 (33 hex) to 50 (32 hex) at offset 7 in the file.
&lt;/p&gt;
&lt;p&gt;
   When you run it you get:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;D.foo&lt;br&gt;
   D.foo&lt;br&gt;
   Exception in thread "main" java.lang.AbstractMethodError: p3.C.foo()V&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at p3.C.&lt;INIT&gt;
      (C.java:5)&lt;br&gt;
      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at p4.D.&lt;INIT&gt;
         (D.java:3)&lt;br&gt;
         &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at p1.A.main(A.java:10)&lt;br&gt;
   &lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   (This is a variation of the bug I reported &lt;a href="http://groups.google.com/group/jvm-languages/msg/e2f30228592851e2"&gt;here&lt;/a&gt;.)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=f58b4ef6-4077-4f23-a840-b784d28db586"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=f58b4ef6-4077-4f23-a840-b784d28db586</comments>
    </item>
  </channel>
</rss>
