# Wednesday, August 7, 2002
« No Title | Main | No Title »
No Title

I started work netexp. This is the tool that generates Java stubs for all public types in a .NET assembly, so that Java code can be compiled against .NET code (using any standard Java compiler). The VM understands the stubs and replaces any references to them with the actual .NET types.

It's still in its very early stages, but here is an example that already runs:

import system.*;
import system.reflection.*;
class test
  public static void main(String[] args)
    Type type = Type.GetType("System.Object");
    ConstructorInfo ci = type.GetConstructor(
BindingFlags.Public | BindingFlags.Instance,
       null, Type.EmptyTypes, null);

I updated the snapshot.

Wednesday, August 7, 2002 4:11:58 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Wednesday, August 7, 2002 2:49:04 PM (W. Europe Daylight Time, UTC+02:00)

That's awesome! I look forward to testing that (which I'll do as soon as I get some time).

Here's a question for you.

What do you do if you have a Java program that depends on String.hashCode() doing exactly what Java defines it to do (ie, produce consistent output with other VMs) rather than what .NET defines String.GetHashCode() to do? I encountered this in my own code so in theory I can implement (or steal from ClassPath) an implementation of String.hashCode() and use that, but the problem could come up in other scenarios. It's an interesting one, don't you think? :)

Wednesday, August 7, 2002 2:50:56 PM (W. Europe Daylight Time, UTC+02:00)

btw, how come your example isn't "import System.Reflection"? Does netexp auto-lowercase all namespace names? That seems risky if (as I believe, but don't know for sure) it's possible to have two distinct .NET namespaces with names differing only by case...
Comments are closed.