September 6, 2002 — So you've got a handle on the various languages in the .Net platform: C# .Net, Visual Basic .Net, C++ .Net with managed extensions, but chances are you haven't heard about J#. Visual J# .Net is Microsoft's Java development tool for the .Net Framework. It provides Visual J++ users with a great migration path to .Net and also lowers the barrier for Java developers looking to develop for the .Net Framework. Note that Visual J# .Net doesn't compile to Java byte code, but rather it compiles down to Microsoft Intermediate Language (MSIL), a portable code that the Common Language Runtime (CLR) then compiles to native code.

At first, I was pleased to hear about a Java language tool for .Net. I thought I'd be able to move all my Java code straight over to .Net. This proves true for some code, but not all. J# implements most of the JDK 1.1.4 class libraries, but not Java 2.0 class libraries. J++ users will also find the extensions they need for migration, such as Java COM (Component Object Model) and J/Direct. The J# team has added support for the AP (advanced placement) subset of the JDK 1.2 class libraries. The AP subset is a set of extra classes included in the java.util package for academic purposes.

Two main pieces of the Java 1.1.4 specification are not implemented in J#: RMI (Remote Method Invocation) and JNI (Java Native Interface). Instead, J# users can take advantage of the rich APIs offered by the .Net Framework to perform similar tasks.

Visual J# .Net:

  • Provides native support for XML Web services. It:

    • Has no plumbing code to write
    • Exposes any method as a Web service with one keyword
    • Easily consumes Web services
  • Features built-in interoperability between languages: J# developers can consume components written in Visual Basic .Net, Visual C#. Net, Visual C++ .Net, and so on, and vice versa
  • Uses the powerful Visual Studio .Net editor, which features IntelliSense, color syntax highlighting, and full debugger support. Visual Studio .Net is an open tools platform providing users with a variety of choices for third-party products in a highly productive, consistent development environment. J# leverages the rich designer support offered in Visual Studio .Net, such as:

    • Windows Forms designers
    • Web Forms designers
    • Data designers

When you install J# you get:

  • Class libraries
  • J# compiler
  • JBImp: A tool for importing Java byte code into MSIL, which proves useful if you do not have source code for parts of the application
  • J++ project migration wizard

You should use Visual J# .Net if you are interested in programming for the .Net Framework and have existing investments in Java skills or code. It lowers the barrier to entry for .Net by providing syntax and libraries immediately familiar to a Java developer.

Visual J# .Net is also a great teaching tool. With Visual J# .Net, you can immediately take advantage of Visual Studio's first class IDE, which allows you to focus on teaching programming concepts and logic, turning the focus away from plumbing code and spelling errors.

Visual J# .Net is not intended to generate Java byte code. This tool generates MSIL, which .Net's CLR compiles. It is also not meant to attract, for example, Visual Basic or C# users. Visual Studio .Net provides an excellent tool for those users already. Instead, Visual J# .Net provides Java developers with a tool they can readily and easily understand while maintaining the hard-earned skills they already have.

Jonathan Lurie has been implementing commercial information systems for almost a decade. He has worked with Java since 1997. He holds a bachelor's degree in computer science as well as several certifications. When not working on a new software system, he enjoys mentoring, writing, and teaching.

Learn more about this topic