# Wednesday, 07 August 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, 07 August 2002 16:11:58 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
Wednesday, 07 August 2002 14:49:04 (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, 07 August 2002 14:50:56 (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...
Home page

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

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

Comment (HTML not allowed)  

Live Comment Preview