Featured Whitepapers
Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Just don't call J# Java

J#, Microsoft's newest language for the .Net platform, easily moves Visual J++ applications to .Net

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
A great many Java developers considered Microsoft's Visual J++ to be the most productive Java IDE (integrated development environment) on the market. The settlement of a lawsuit brought by Sun Microsystems stopped VJ++'s evolution in its tracks and appeared to end Microsoft's involvement with Java.

In a surprising move, Microsoft recently released the latest addition to the .Net constellation of programming languages: J#, pronounced J sharp. Although J# is not Java, it is a full implementation of Sun's Java language specification and will run many existing Java applications after a simple recompile or binary conversion. But J# code neither runs in a JVM nor leverages run-time features created after version 1.1.4 of Sun's Java SDK (software development kit). Microsoft is banking that the differences between Java and J# will be obvious to lawyers and judges -- and that J# will give Java serious competition for the minds of Java developers.

Microsoft has two goals for J#: rescue marooned Visual J++ developers and give other Java coders an easy path to the .Net platform. By promising to match VJ++'s feature set, and most of that promise is realized in this beta, J# gives VJ++ users a soft place to land. Microsoft will have a more difficult time convincing Java developers that they can live without JDK 1.2 and 1.3 compatibility, J2EE (Java 2 Platform, Enterprise Edition), and platform independence. The alluring VJ++ environment enticed many programmers to write Java applications that ran only on Windows. Can J# work the same magic for .Net?

The first beta release of J# plugs into Visual Studio.Net Beta 2, rather than the release candidate. The J# beta is incompatible with the VS.Net release candidate unveiled at the Professional Developers Conference, but another J# beta is planned in Q1 2002, after the release version of Visual Studio.Net ships. Microsoft will slip a coupon for J# into the VS.Net box, with availability expected in mid-2002. J# is not yet supported by the .Net Compact Framework, but it reportedly will be. The entire J# package, including documentation, fits in a slender 7-MB download. The installer integrates J# into Visual Studio.Net, which must already be present. After installation, VS.Net's New Project options are expanded to cover new J# Windows applications, Web applications, and Web services. As does other .Net languages, J# compiles to MSIL (Microsoft intermediate language). The J# compiler will not generate Java-compiled byte code (class) files, so it is impossible to run a J# application outside of .Net. You also cannot use compiled Java class files in J# projects because the .Net runtime does not understand Java byte code. If you do not have the source code for the Java classes you use, you would be out of luck if not for Microsoft's byte-code converter.

This clever utility translates Java byte code into MSIL, making compiled Java code run on .Net. Such translation cannot be done at runtime; you run the converter during development for each Java class you plan to use, turning the class into a .Net assembly that can be called from J# or any other .Net language. The conversion process is fast, and the converter accepts wild cards and traverses subdirectories to make batch conversion of a collection of Java classes easy.


  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources