<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="security" content="public" /> <meta name="Robots" content="index,follow" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> <meta name="DC.Type" content="reference" /> <meta name="DC.Title" content="Running IBM Toolbox for Java classes on the i5/OS Java virtual machine" /> <meta name="abstract" content="There are some special considerations for running the IBM Toolbox for Java classes on the IBM Developer Kit for Java (i5/OS) Java virtual machine (JVM)." /> <meta name="description" content="There are some special considerations for running the IBM Toolbox for Java classes on the IBM Developer Kit for Java (i5/OS) Java virtual machine (JVM)." /> <meta name="DC.Relation" scheme="URI" content="jvm.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="jvmrun" /> <meta name="DC.Language" content="en-us" /> <!-- All rights reserved. Licensed Materials Property of IBM --> <!-- US Government Users Restricted Rights --> <!-- Use, duplication or disclosure restricted by --> <!-- GSA ADP Schedule Contract with IBM Corp. --> <link rel="stylesheet" type="text/css" href="./ibmdita.css" /> <link rel="stylesheet" type="text/css" href="./ic.css" /> <title>Running IBM Toolbox for Java classes on the i5/OS Java virtual machine</title> </head> <body id="jvmrun"><a name="jvmrun"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">Running IBM Toolbox for Java classes on the i5/OS Java virtual machine</h1> <div><p>There are some special considerations for running the IBM<sup>®</sup> Toolbox for Java™ classes on the IBM Developer Kit for Java (i5/OS™) Java virtual machine (JVM).</p> <div class="section"><h4 class="sectiontitle">Command call</h4><p>Two common ways to call a command are to use one of the following:</p> <ul><li>The IBM Toolbox for Java CommandCall class</li> <li>The java.lang.Runtime.exec method</li> </ul> <p>The <a href="cmdc.htm#cmdc">CommandCall</a> class generates a list of messages that are available to the Java program once the command completes. This list of messages is not available through java.lang.Runtime.exec().</p> <p>The java.lang.Runtime.exec method is portable across many platforms, so if your program must access files on different types of servers, java.lang.Runtime.exec() is a better solution.</p> </div> <div class="section"><h4 class="sectiontitle">Integrated file system</h4><p>Common ways to access a file in the integrated file system of the iSeries™ server:</p> <ul><li>The IFSFile classes of the IBM Toolbox for Java licensed program</li> <li>The file classes that are a part of java.io</li> </ul> <p>The IBM Toolbox for Java <a href="ifs.htm#ifs">integrated file system</a> classes have the advantage of providing more function than the java.io classes. The IBM Toolbox for Java classes also work in applets, and they do not need a method of redirection (such as iSeries Access for Windows<sup>®</sup>) to get from a workstation to the server.</p> <p>The java.io classes are portable across many platforms, which is an advantage. If your program must access files on different types of servers, java.io is a better solution.</p> <p>If you use java.io classes on a client, you need a method of redirection (such as the iSeries Access for Windows) to get to the server file system.</p> </div> <div class="section"><h4 class="sectiontitle">JDBC</h4><p>Two IBM-supplied JDBC drivers are available to programs running on the i5/OS JVM:</p> <ul><li>The IBM Toolbox for Java JDBC driver</li> <li>The IBM Developer Kit for Java JDBC driver</li> </ul> <p>The IBM Toolbox for Java <a href="jdbc.htm#jdbc">JDBC</a> driver is best to use when the program is running in a client/server environment.</p> <p>The IBM Developer Kit for Java JDBC driver is best to use when the program is running on an iSeries server.</p> <p>If the same program runs on both the workstation and the server, you should load the correct driver through a system property instead of coding the driver name into your program.</p> </div> <div class="section"><h4 class="sectiontitle">Program call</h4><p>Two common ways to call a program are as follows:</p> <ul><li>The ProgramCall class of the IBM Toolbox for Java</li> <li>Through a Java Native Interface (JNI) call</li> </ul> <p>The <a href="pgmc.htm#pgmc">ProgramCall</a> class of the IBM Toolbox for Java licensed program has the advantage that it can call any iSeries server program.</p> <p>You may not be able to call your iSeries server program through JNI. An advantage of JNI is that it is more portable across server platforms.</p> </div> </div> <div> <div class="familylinks"> <div class="parentlink"><strong>Parent topic:</strong> <a href="jvm.htm" title="The IBM Toolbox for Java classes run on the IBM Developer Kit for Java (i5/OS) Java virtual machine (JVM).">i5/OS Java virtual machine</a></div> </div> </div> </body> </html>