2.2. Java Environment
More and more applications today are being developed using the Java programming language. One can assume that porting a Java application is relatively easier than porting applications that were developed in other programming languages such as C or C++. However, our experience shows that not all Java Development Kits (JDKs) are created equally, which can make porting Java applications not as easy as first assumed.
All JDKs are expected to follow the Java specifications set forth by Sun. However, implementation specifics are left to the vendor. Most vendors include helper classes that provide functionalities to implement specific Java application programming interfaces (APIs). These helper classes are not hidden from the Java developer and hence can be used as if they are part of the JDK specification. This is okay as long as the JDK includes this helper class. When the application is run on a Java Runtime Environment (JRE) from a different vendor that uses different helper classes, however, the application will fail to find that specific class. This problem can easily escalate to a suspicion of a bug with the Java implementation that does not have the same helper class as the original JDK. The solution here is to not use helper classes included in the JDK that are not part of the Java API specification. Expect this and other similar problems to crop up from time to time when doing a port of a Java application.
Several JVM distributions for Linux can be downloaded from different Web sites:
When porting Java applications from other platforms to Linux, be aware that some JVM switches used to start the JVM on other platforms may not exist on the JVM available for Linux. These switches are used on the specific platform to make the JVM and the Java application run as optimally as possible on that platform. Use of these specific switches depends on their availability from the JVM distributions just mentioned.