13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.3 How the IBM JDK Differs from the Sun JDK1756.3.1 PerformanceIBM’s Java implementati<strong>on</strong> appears to run most code faster than the Sun implementati<strong>on</strong>.Benchmarking something as complex as a Java Virtual Machineis well bey<strong>on</strong>d our scope here (and, in fact, coming up with a benchmark thatwill actually predict how much faster your applicati<strong>on</strong> will run <strong>on</strong> <strong>on</strong>e envir<strong>on</strong>mentversus another is practically impossible). N<strong>on</strong>etheless, we have seen somefairly dramatic performance improvements when running Java applicati<strong>on</strong>sunder the IBM JVM—improvements <strong>on</strong> the order of 50%–100%.It is interesting to note that it does not matter which Java SDK producedthe bytecode files. We see these improvements when the compiled classes arerun, no matter which compiler (IBM’s or Sun’s) was used to produce them.This suggests that it is some combinati<strong>on</strong> of a faster virtual machine and/or abetter Just-In-Time compiler (JIT) that gives IBM’s runtime its apparentperformance advantage.For the most part, we use the Sun development kit and runtime, simplybecause Sun’s is the definiti<strong>on</strong> of Java. But if executi<strong>on</strong> speed is proving to becritical for your applicati<strong>on</strong>, c<strong>on</strong>sider the IBM Java runtime. You may see somespeed advantages.6.3.2 Differences in the CommandsYou 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 c<strong>on</strong>sole interface, thelatter does not. For our purposes, this does not matter. The IBM Java SDKcomes with an Object Request Broker Daem<strong>on</strong> (orbd) for CORBA/IIOP whilethe 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 usethe Sun documentati<strong>on</strong> for the IBM tools.6.3.3 IBM ClassesIBM’s Eclipse project (which we begin to cover in Chapter 10) provides a largeGUI API library called SWT. We w<strong>on</strong>’t go into that here; it is covered inChapter 17. Of more immediate interest is IBM’s enhanced BigDecimal class(com.ibm.math.BigDecimal) which addresses a lot of deficiencies in Sun’simplementati<strong>on</strong> of decimal arithmetic. We will be using the standard Java classin our book (as it is the same for all development kits we cover), but you mightwant to take a look at IBM’s FAQ document <strong>on</strong> their enhanced BigDecimal

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!