Perspective: What About Java for the .NET Framework? From the beginning, Microsoft has provided J#, a version of the Java programming language for the .NET Framework. This language implements Java's syntax and behavior on top of the CLR. It's nice to have the option, but when does it really make sense to use J#? There are two main situations when J# is the right choice. The first is when existing Java code needs to be moved to the .NET Framework. This code might have been created using Visual J++, Microsoft's pre-.NET Java tool, or a more mainstream Java tool such as Eclipse. In either case, the existence of J# makes it easier to port this code to the .NET world. It's important to realize, though, that the .NET Framework doesn't implement commonly used Java technologies such as Java Server Pages and Enterprise JavaBeans, so not all Java code can be easily ported. Still, typical Java business logic can be made to run on the .NET Framework without too much work. There's even a binary converter tool that can directly convert Java bytecode into MSIL, a useful thing to have if an application's source is no longer available. The second situation in which J# might be a good language choice is when an experienced Java developer moves to the .NET Framework. People often feel an enormous attachment to their syntax, and so working in a familiar language might make the transition easier. Still, it's hard to argue that creating new .NET Framework code in Java is really a good thing. Microsoft is clearly focused on C# and VB as the main languages for building new .NET applications, and so there's some risk in choosing anything else. Also, the absence of standard Java packages in .NET means that this transitioning Java developer still won't feel completely at homethere's still a lot to learn. And given the strong similarities between Java and C#, even the biggest Java fan shouldn't be too upset at switching to C# instead. Microsoft's Java support is clearly focused on migrating code and developers to the .NET Framework, rather than on helping developers create great new software in Java. The battle lines are clear: It's .NET vs. the Java world. This is unquestionably a good thing. Having two powerful technology camps, each with a strong position, is the ideal world. Each provides innovations that the other can learn from, and in the end, the competition benefits everyone. |