.NET and Java cross-platform, we expect, it is not easy

.NET and Java cross-platform, we expect, it is not easy.

Java is the most attractive place in cross-platform. And .NET can be seen as a Java’s improvement version, including most of Java, so there is of course a cross-platform potential. But carefully pursue, Java and .NET procedures are actually not really cross-platform, because Java VM (virtual machine) and .NET VM itself is a platform, while Java programs can only be executed on Java VM, .net program only It is important to execute on the .NET VM, what is the operating system under the bottom of the VM, is not critical.

More clearly, Java and .NET cross-platform referring to a cross-“operating system” platform. Therefore, the Java VM and .NET VM can be ported to what OS platform, Java program and .NET program can cross what platform. From version 1.0, Java has been in the past eight years, and Java has not been there. In addition to the overwhelming victory on the server, the installation ratio of the desktop system has also exceeded 90% (2002 data), and with the recent Dell and Sun signed, Java VM is pre-installed on the PC. This data will be higher in the future.

But in fact, the opening of Java across platforms is not the beauty we think, the main reason is “four different”:

The version is inconsistent: Although many operating systems have Java VM, the version is not synchronized with the latest version of Java VM, even the gap between different versions. For example, early Mac OS is followed by Java’s footsteps, and it is often a version, for example, in Java 1.3, two years later, Mac OS still has only 1.2 version of Java VM available (but now Mac OSX It has been packed up with Java’s version. In addition, Java VM installation has exceeded 90%, but there should be many Microsoft VMs built in IE (Java 1.1.4 API), and cannot perform 1.2 Java 2 programs. Fortunately, the problem has recently improved this problem.

Special dynamic links do not exist: For those non-J2SE standard dynamic link libraries (such as Java 3D), only three operating systems in Window, Solaris, Linux. About this, I don’t think there will be improved in the next few years.

Standard is not open: Sun has submitted Java to ISO to develop the standard, but later, because of the relocation, it is necessary to set up the JCP committee for Java standard development unit. This also makes Java not as good as the extent of publicity. (This aspect, .NET is better than Java, at least the core part is already the standard of ECMA).

Vendors are not convinced: this may cause standard split. Early Microsoft has some movement that may cause Java split in Visual J ++ products. In recent years, companies such as IBM and JBOSS have recently conflicted with SUN on J2EE products. Even before, a company has the possibility of using the market’s power, and the possibility of the standard. For example, Eclipse’s SWT is an API that competes with Java’s AWT / SWING.

The technicians did not keep up with new technologies: the past eight years, Java repair replenishment, abandoned some old APIs and programming thinking, adding many new things. If the developer is not allowed to supplement new knowledge at any time, it is still difficult to develop the system with an old way. This is actually a very serious problem. .NET in cross-platform problems: .NET Some APIs do not take into account cross-platform demand, such as Windows Forms. This will make the difficulty of porting .NET VM to different operating systems, it will be relatively high. MONO (Linux .NET VM) once wanted to port Windows Forms to Linux, but later gave up, changed to Windows Forms on Wine (of course, efficiency will become variable). But then the SYSTEM.DRAWING is better, so it is based on system.drawing to achieve the underlying SWF, MONO 1.2 publishing is waiting for SWF1.0. Of course, efficiency is definitely more than SWF under Windows. However, Mono is to use GTK # -… Mono additionally launched the GTK # set of GUI’s API (Pack GTK +).

The technicians did not keep up with new technologies: .NET has been developed for 5 years, the latest version 2.0 and 1.x version compared, modified, adding many APIs to increase many new things, the thinking of programming has also happened significant The change. If the developer is not allowed to supplement new knowledge at any time, it is still difficult to develop the system with an old way. This is actually a very serious problem, MS’s Webcast is very good, and MS is better than SUN in helping technicians keep up with new technologies. At present, Microsoft has a set of .NET VMs, named Share Source Common Language Infrastructure, referred to as SSCLI, known as Rotor. SSCLI is only for enthusiasts to use, does not do business issuance (Microsoft Business Edition .NET VM is .NET CLR). SSCLI can be executed on platforms such as FreeBSD, Windows, Mac OS X.

In order to let .NET can get rid of Microsoft’s control, in addition to the MONO program funded by Novell / Ximian (Mono is the meaning of the Spanish “Monkey”), GNU (Free Software Foundation), there is also a similar plan for dotgnu portable.net . If MONO and Dotgnu

Portable.net and other plans can be successful, then .NET’s cross-platform can reveal the dawn, and now there are many Linux distributions built into the mono platform, such as the Novell Suse Linux series operating system.

After .NET will be popular, at least in Windows and Linux. Linux and Mono get a strong support from Novell, and believe that in the near future .NET will be called the platform developed in the Linux platform. In order to let Java can enter the world of .NET, some people have designed Java VM on .NET VM, “Ikvm.Net” is such a set of Java VMs. There are many similarities between Java VM and .NET VM, Ikvm.net can suit, many mechanisms (such as garbage collection) directly use the .NET VM, do not need to be completed. With VMs like IKVM.NET, Java can be across the .NET platform, there is a good way to extend forces.

In order to grab the market, Java and .NET camps have made it out. The recent footsteps recently appeared in the Java camp, which is a good phenomenon. And the .NET camp makes many tricks and provides the following tools:

Visual J #: If it is 1.1.4 or earlier Java program, you can use Visual J # to compile the original code of Java into a .NET’s MSIL. Such compilation, the success rate can reach nearly 100%.

Program Conversion Tool: If your Java program is not 1.1.4, it is used in Java.

2 Many new features, then you can use Microsoft’s program conversion tools (such as JLCA) to help transfer Java programs to .NET programs to achieve whale. These tools can usually convert eight-year-round program code to success, but many places still need to be manually adjusted. We can expect that such tools in future versions will be more powerful, and the success rate of conversion will be higher.

Program cooperation tool: existing Java programs cannot be changed to .NET, and the conversion tool is not 100% success, then if the existing Java program continues to operate, encourage everyone to change the new program .NET platform, And slowly change the old Java program to achieve the effect of eating. At this time, the program code cooperation tool is important, responsible for the communication bridge between the Java old system and the .NET system. For example: Microsoft .NET and J2EE Interoperability Toolkit is such a tool.

Related Posts