Guild Companies, Inc.  
 
Midrange Guru - Tech Tips
OS/400 Edition
Volume 2, Number 10 - February 8, 2002

Boosting Java Performance

Hey, David:

Do you have any tips on improving the performance of Java programs on the iSeries? All of the Java programs that I have created ran a lot faster on my PC.

-- Scott

You didn't mention the types of programs that you are trying to run. I suspect that they do not access a database. The iSeries is primarily a business machine, and performance of business applications is generally governed by database and disk I/O performance. Where iSeries Java programs excel is with database intensive applications.

Here are some things that you can do to improve the performance of Java programs on your system:

  1. Install the latest Java Development Kit (JDK)
  2. Make sure that you have the latest cumulative and group PTFs
  3. If you use the iSeries Java Toolbox, use the native optimizations
  4. Pre-compile your Java programs using the Create Java Program (CRTJVAPGM) command

To address item one, order and install the latest JDK. The latest JDK for V4R4 systems is 1.2, for V4R5 and V5R1 systems, order the 1.3 JDK. Use the Licensed Program menu (GO LICPGM) and select option 10 to determine what JDK you are using. The IBM Web page on post-release JDKs describes the steps to follow when upgrading your JDK. On releases prior to V5R1, the 1.3 JDK does not automatically become the default, so you will have to set an environment variable when running and compiling your Java programs. For example:

java -Djava.version=1.3 mypackage.MyClass.java
 

For item two, make sure you have the latest cumulative and group PTFs installed. You can use IBM's iSeries support Web page to review the Preventive Service Planning (PSP) information, which includes information about available group PTFs. When you have identified the PTFs you need to order, you can use the Internet PTF Download (iPTF) facility.

The third item requires that you have the proper version of the iSeries Java Toolbox installed for your release and that you add the native extensions to your classpath. IBM provides information about native optimization in the JTOpen FAQ. You might also want to review IBM’s JDBC FAQ, which goes into more detail. You will also have to specify the proper JDBC URL in your applications, which will look like this:

("jdbc:db2:system", "user", "password") 

Finally, to address item four, you need to pre-compile your Java programs. Use the Create Java Program (CRTJVAPGM) command, CLSF(‘/path/ClassFile.CLASSorJAR’) OPTIMIZE(40). This last tip will only improve performance for classes loaded by the default class loader.

-- David

Sponsored By
RJS SOFTWARE SYSTEMS

Save TIME AND MONEY with our

AS/400 - iSeries Report & Data Delivery Systems

RJS Software Systems, Inc. - http://www.rjssoftware.com/mrs.asp

Delivering AS/400 reports via email, web, Lotus Notes, Domino or CD.

Whether it's Native AS/400 or PC-based, we have the solution.

* WinSpool/400 report download and conversion
* Text converters (ASCII, RTF, PDF, HTML, Spreadsheet)
* Form converters (AFP, EZ/Print, Formation, Formsprint, & CreatePrint to PDF)
* Split reports with AS/400 Report Splitter
* Email Report Server, Web Report Server
* Domino Report Server
* Batch Report Server delivery to LAN, IFS and FTP
* SMTP/400, POP/400 & FTP/400 Email/Transfer APIs
* Query and Convert AS/400 Files with DataExport/400
* Web-Based AS/400 Data Access via Active Server Pages

For a FREE FULLY FUNCTIONAL DEMO CD, please visit our Web site at http://www.rjssoftware.com/mrs.asp.

Contact us at 888-RJS-SOFT or email us at sales@rjssoft.com

THIS ISSUE
SPONSORED BY:
RJS Software Systems
BCD Software, Int'l.
BACK ISSUES
TABLE OF CONTENTS
Boosting Java
Performance
Visual Basic and
S/36 Files
Reader Feedback and Insights
  Newsletters | Subscribe | Advertise | About Us | Contact | Search | Home  
  Last Updated: 2/8/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.