Section 6.3. How the IBM JDK Differs from the Sun JDK


6.3. How the IBM JDK Differs from the Sun JDK

After the last chapter, which was one of the longest in the book, this chapter should come as something of a relief. It is one of the shortest in the book. Why? Because the IBM Java Software Development Kit is practically identical in use to the Sun package. It differs in only a few respects and that is all we will talk about here.

One of the biggest differences is the version of Java available from each vendor. Sun has the newest versions, as they have been defining what those are. IBM is still releasing the 1.3 versions of Java as Sun begins to release 5.0. But you may not want or need the "bleeding edge" of the technology.

6.3.1. Performance

IBM's Java implementation appears to run most code faster than the Sun implementation. Benchmarking something as complex as a Java Virtual Machine is well beyond our scope here (and, in fact, coming up with a benchmark that will actually predict how much faster your application will run on one environment versus another is practically impossible). Nonetheless, we have seen some fairly dramatic performance improvements when running Java applications under the IBM JVMimprovements on the order of 50%100%.

It is interesting to note that it does not matter which Java SDK produced the bytecode files. We see these improvements when the compiled classes are run, no matter which compiler (IBM's or Sun's) was used to produce them. This suggests that it is some combination of a faster virtual machine and/or a better Just-In-Time compiler (JIT) that gives IBM's runtime its apparent performance advantage.

For the most part, we use the Sun development kit and runtime, simply because Sun's is the definition of Java. But if execution speed is proving to be critical for your application, consider the IBM Java runtime. You may see some speed advantages.

6.3.2. Differences in the Commands

You will notice a few differences. For example, there is both a java and a javaw. Both invoke the Java runtime. The former has the Java console interface, the latter does not. For our purposes, this does not matter. The IBM Java SDK comes with an Object Request Broker Daemon (orbd) for CORBA/IIOP while the Sun SDK does not. Again, for our purposes this doesn't matter.

For the bulk of the utilities, the differences are so slight that you can use the Sun documentation for the IBM tools.

6.3.3. IBM Classes

IBM's Eclipse project (which we begin to cover in Chapter 10) provides a large GUI API library called SWT. We won't go into that here; it is covered in Chapter 17. Of more immediate interest is IBM's enhanced BigDecimal class (com.ibm.math.BigDecimal) which addresses a lot of deficiencies in Sun's implementation of decimal arithmetic. We will be using the standard Java class in our book (as it is the same for all development kits we cover), but you might want to take a look at IBM's FAQ document on their enhanced BigDecimal class.[5] It also appears that IBM's class may become the official Sun version in Java 5.0 when it comes out. The primary feature of this class is its ability to deal correctly with rounding and precision, which is of great benefit in financial and scientific applications. Check out IBM's documentation and see if this is something you should use.

[5] http://www2.hursley.ibm.com/decimalj/decfaq.html

Note that Java bytecodes are Java bytecodes. You can download and use the IBM class with the Sun Java Runtime. It is there if you need it.



    Java Application Development with Linux
    Java Application Development on Linux
    ISBN: 013143697X
    EAN: 2147483647
    Year: 2004
    Pages: 292

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net