Java: Transforming the AS/400?

Using the best of technologies will ensure that your organization will stay competitive. The AS/400 provides the appropriate platform to develop your applications, but what language should you choose? There are so many available to develop Internet/intranet-based applications, but few provide the accessibility to the AS/400 resources that you’ll need. Java is the only language that allows you to develop attractive, GUI-based applications and provide the performance your applications will demand.

Running Java on the AS/400 has many advantages. Of course there’s always the talk about the portability of Java—it can be created and run on any system that has a Java Virtual Machine (JVM) available for it. The JVM provides the interface to the system and the specific resources based on the needs of application. But understand that Java applications are only portable if they are programmed to the “Java Standard.” If they use any Java extensions, like those provided by Microsoft’s Visual J++, they may not run on other platforms.

One of the unique aspects of the implementation of Java on the AS/400 is a component called the Java transformer, which is invoked explicitly by the CRTJVAPGM command or on the fly when Java programs are run for the first time. The Java transformer preprocesses Java bytecodes that are produced by any Java compiler on any platform and contained in a class file, jar file, or zip file to prepare them to run using the OS/400 JVM. The Java transformer produces an optimized 64-bit binary object that is executed by the PowerPC processor directly at run time, not interpreted by the JVM.

Another unique aspect of Java on the AS/400 is that the JVM runs below the MI and, since V4R3, the JVM has been embedded in the SLIC. The combination of this and the pre-processing done by the Java transformer allows for the Java code to be executed extremely fast and efficiently on the AS/400.

To aid in the development of Java applications, developers can use The AS/400 Java Development Kit, which is fully compatible with the Sun standard for Java 2. The Kit comes with a set of predefined classes, which allows you to access specific AS/400 resources. This kit will aid your developers in the creation of Java applets and servlets.

If the use of applets and servlets is not enough for your Java needs, WebSphere allows you to incorporate some of the newer features and functions of Java into your applications. Not to mention it provides some assistance for the AS/400 and speeds up the execution of the Java code. Some of the new technologies that WebSphere now incorporates are Java Server Pages (JSP), JavaBeans and Enterprise JavaBeans and support for Extensible Markup Language (XML).

How can you use Java in your systems? You can use a combination of the listed Java technologies to provide the proper interface and accessibility to your back-end AS/400 resources. There are many combinations you can use to get the results you need. You can use XML as the means for displaying the data and JavaBeans or Enterprise JavaBeans as the method for retrieving the data.

The same can be done with applets displaying the information and/or getting the requirements and servlets retrieving/accessing the AS/400. JSPs can also display and get the required input and pass it to a waiting JavaBean or Enterprise JavaBean. Whichever combination you choose to use, there is a single language that is used for both components, Java. With these methods, you can take advantage of each of the technologies. JavaBeans and servlets are best used as the interface to your AS/400. If used properly, you can establish an attractive and effective application.

Why use Java on the AS/400? Quite simply: It’s a perfect fit. With Java you get a programming language that is both functional and can develop visually appealing applications, not to mention the fact that you can port Java applications to your AS/400 from other systems. The AS/400 provides the hardware, software and the security that an Internet/Intranet application requires. Also, the AS/400 provides an extremely effective method for executing the Java code. Together these two will march the AS/400 into the new millennium, and prove that, once and for all, the AS/400 does have a place on the Internet.

Mark Buchner is president and founder of Astech Solutions Inc. (Aurora, Ontario). mailto:Mbuchner@astech.com

Related Editorial:

  • An AS/400 First: Taking the Lead on Java2
  • Browsers, Java Dominate Development
  • Serving Up Java Pages

    Related Information:

  • IBM's AS/400 Java Page