Migrating Java Code to .NET
Over the past few years, Microsoft has come out with its two IDEs in the "sharp" family: C# and J#. Some developers have found C# to be smoother and less cluttered than Java, and also more feature-rich in certain ways. J#, on the other hand, is designed for developers who are familiar with Java syntax but who want to start writing applications and services for .NET.
Lots of developers have argued that J++ was never really Java anyway and that J# is even less so.
"First off, the only thing that Java (the language) and J# have in common is their syntax. Their class libraries are completely different," wrote one developer in an Internet newsgroup.
"Java developers will find it no more easy to transition to J# than they would C#," he predicted. "When you start writing J# .NET applications, start praying to the Microsoft gods that you never need to port to another OS because then you will truly be [out of luck]." For its part, Microsoft has acknowledged that applications written with J# are not compatible with JVM.
Moving from J++ is sure to be time-consuming for developers, and quite possibly costly, too. However, if you do decide to migrate to some other flavor of .NET, some tools out there are intended to help right now, with others slated for the future.
The Java Language Conversion Assistant (JLCA) 2.0, available now, is supposed to automatically convert most existing Java-language source code into C#, translating both language syntax and library calls.
If you're open to the idea of J#, you can use Visual Studio (VS) 2003 for J# to "migrate existing Visual J++ or Microsoft SDK for Java applications to the .NET Framework, while still retaining the Java syntax," according to Microsoft. However, J# does not support Java classes.
Microsoft's forthcoming J# Browser Controls (JBC) will add the capability to recompile existing Java applets to J#. Despite the demise of MS support for J++ on the near horizon, the final release of JBC isn't scheduled for availability until this fall. On the other hand, the beta version is downloadable now, noted Prashant Sridharan, product manager at Microsoft.
If you're able to hold out even longer, Microsoft also expects to include JBC in the J# edition of the next release of Visual Studio .NET, codenamed Whidbey.