.NET Developments

Jan 7 2009   10:31AM GMT

Ja.NET: A Java compiler for .NET CLR



Posted by: YuvalShavit
Tags:
.NET-Java Interoperability

Early last month I wrote an article about Java application frameworks being ported to .NET. The piece caused a bit of commotion on our sister site TheServerSide.net, and it also brought to my attention a related project.

All of those ports start with the idea that it’d be nice to use established Java frameworks and paradigms in .NET and come up with the natural solution, which is to port the software. But there’s another approach, too: why not just compile those existing frameworks to work with .NET’s CLR?

That’s the idea behind Ja.NET SE, an open source project based on the Apache Harmony compiler for Java. Instead of targeting Java bytecode, Ja.NET compiles to Microsoft’s Common Intermediate Language (CIL), which the .NET runtime then consumes natively.

Ja.NET is already fairly well along. Its lead programmer Dave Tillman says it can already compile itself and create assemblies out of .class files. Still missing are Java’s SWING and AWT classes for building GUIs and a SQL module, which Tillman said he’d like to see modified to work with ADO and ADO.NET. Tillman said he’s hoping more developers will step up and contribute to the project.

If Ja.NET catches on, Tillman said, projects like Spring and Hibernate won’t have to fork off .NET-specific siblings. Instead, .NET developers will be able to use the existing Java frameworks by just recompiling them.

The project could also simply projects that currently tap into Windows’ functionality through the Java Native Interface (JNI). For instance, the popular open source IDE Eclipse, which is written in Java, uses JNI to access WPF so that it can have a native look and feel on Windows, Tillman said. That means not just more code, but also more runtime overhead, since it uses both the JVM and .NET’s CLR. If Ja.NET is successful, Eclipse’s developers could instead compile the whole project to CIL and do away with the need to have the JVM and CLR communicate, Tillman said.

1  Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Abdul
    that would be nice and wonderful, but could they also start a project that will allow the conversion of c#.net code to java codes.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: