ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/codeex.htm

386 lines
29 KiB
HTML

<?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="Code examples for the IBM Developer Kit for Java" />
<meta name="abstract" content="The following is a list of code examples for the IBM Developer Kit for Java." />
<meta name="description" content="The following is a list of code examples for the IBM Developer Kit for Java." />
<meta name="DC.Relation" scheme="URI" content="whatitis.htm" />
<meta name="DC.Relation" scheme="URI" content="intdatex.htm" />
<meta name="DC.Relation" scheme="URI" content="intnumex.htm" />
<meta name="DC.Relation" scheme="URI" content="intlocex.htm" />
<meta name="DC.Relation" scheme="URI" content="accesspropertytest.htm" />
<meta name="DC.Relation" scheme="URI" content="putgetblobs.htm" />
<meta name="DC.Relation" scheme="URI" content="callex.htm" />
<meta name="DC.Relation" scheme="URI" content="usingpositioneddelete.htm" />
<meta name="DC.Relation" scheme="URI" content="putgetclobs.htm" />
<meta name="DC.Relation" scheme="URI" content="udbdatasourcebind.htm" />
<meta name="DC.Relation" scheme="URI" content="udbdatasourceuse2.htm" />
<meta name="DC.Relation" scheme="URI" content="udbdatasourcebind2.htm" />
<meta name="DC.Relation" scheme="URI" content="dataex.htm" />
<meta name="DC.Relation" scheme="URI" content="udbdatasourcebind.htm" />
<meta name="DC.Relation" scheme="URI" content="putgetdatalinks.htm" />
<meta name="DC.Relation" scheme="URI" content="distinct.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljex.htm" />
<meta name="DC.Relation" scheme="URI" content="jtatxend.htm" />
<meta name="DC.Relation" scheme="URI" content="invalidconnect.htm" />
<meta name="DC.Relation" scheme="URI" content="basicjdbc.htm" />
<meta name="DC.Relation" scheme="URI" content="jtamulticonn.htm" />
<meta name="DC.Relation" scheme="URI" content="udbdatasourceuse.htm" />
<meta name="DC.Relation" scheme="URI" content="pmd.htm" />
<meta name="DC.Relation" scheme="URI" content="usingpositionedupdate.htm" />
<meta name="DC.Relation" scheme="URI" content="resultex.htm" />
<meta name="DC.Relation" scheme="URI" content="sensitive2.htm" />
<meta name="DC.Relation" scheme="URI" content="sensitive.htm" />
<meta name="DC.Relation" scheme="URI" content="connectionpoolingsetup.htm" />
<meta name="DC.Relation" scheme="URI" content="exceptionexample.htm" />
<meta name="DC.Relation" scheme="URI" content="jtatxsuspend.htm" />
<meta name="DC.Relation" scheme="URI" content="jtatxeffect.htm" />
<meta name="DC.Relation" scheme="URI" content="connectionpoolingtest.htm" />
<meta name="DC.Relation" scheme="URI" content="statementpoolingtest.htm" />
<meta name="DC.Relation" scheme="URI" content="updateblobs.htm" />
<meta name="DC.Relation" scheme="URI" content="updateclobs.htm" />
<meta name="DC.Relation" scheme="URI" content="jtamultitx.htm" />
<meta name="DC.Relation" scheme="URI" content="useblobs.htm" />
<meta name="DC.Relation" scheme="URI" content="useclobs.htm" />
<meta name="DC.Relation" scheme="URI" content="jtacommit.htm" />
<meta name="DC.Relation" scheme="URI" content="safegetudts.htm" />
<meta name="DC.Relation" scheme="URI" content="getconnections.htm" />
<meta name="DC.Relation" scheme="URI" content="prepex.htm" />
<meta name="DC.Relation" scheme="URI" content="crdb2cac.htm" />
<meta name="DC.Relation" scheme="URI" content="stateex.htm" />
<meta name="DC.Relation" scheme="URI" content="jaaswrld.htm" />
<meta name="DC.Relation" scheme="URI" content="sampthrd.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahajgsssrcl.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahajgsssrsr.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahajgssjacl.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahajgssjasr.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahajsseexmpls.htm" />
<meta name="DC.Relation" scheme="URI" content="callclex.htm" />
<meta name="DC.Relation" scheme="URI" content="clcommex.htm" />
<meta name="DC.Relation" scheme="URI" content="jvlngex1.htm" />
<meta name="DC.Relation" scheme="URI" content="callcex.htm" />
<meta name="DC.Relation" scheme="URI" content="calrpgex.htm" />
<meta name="DC.Relation" scheme="URI" content="iostrmex.htm" />
<meta name="DC.Relation" scheme="URI" content="invapiex.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahapaseexmpls.htm" />
<meta name="DC.Relation" scheme="URI" content="jniex.htm" />
<meta name="DC.Relation" scheme="URI" content="socketex.htm" />
<meta name="DC.Relation" scheme="URI" content="runjpdex.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljex.htm" />
<meta name="DC.Relation" scheme="URI" content="sslcex01.htm" />
<meta name="DC.Relation" scheme="URI" content="sslcex03.htm" />
<meta name="DC.Relation" scheme="URI" content="sslcex02.htm" />
<meta name="DC.Relation" scheme="URI" content="sslcex04.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="codeex" />
<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>Code examples for the IBM Developer Kit for Java</title>
</head>
<body id="codeex"><a name="codeex"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Code examples for the IBM Developer Kit for Java</h1>
<div><p>The following is a list of code examples for the IBM<sup>®</sup> Developer
Kit for Java™.</p>
<div class="section"><p><strong>Internationalization</strong></p>
<ul><li><a href="intdatex.htm">DateFormat</a></li>
<li><a href="intnumex.htm">NumberFormat</a></li>
<li><a href="intlocex.htm">ResourceBundle</a></li>
</ul>
<p><strong>JDBC</strong></p>
<ul><li><a href="accesspropertytest.htm">Access property</a></li>
<li><a href="putgetblobs.htm">Blob</a></li>
<li><a href="callex.htm">CallableStatement interface</a></li>
<li><a href="usingpositioneddelete.htm">Change values with a statement
through another statement's cursor</a></li>
<li><a href="putgetclobs.htm">Clob</a></li>
<li><a href="udbdatasourcebind.htm">Create a UDBDataSource and bind it
with JNDI</a></li>
<li><a href="udbdatasourceuse2.htm">Create a UDBDataSource, and obtain
a user ID and password</a></li>
<li><a href="udbdatasourcebind2.htm">Create a UDBDataSourceBind and set
DataSource properties</a></li>
<li><a href="dataex.htm">DatabaseMetaData interface</a></li>
<li><a href="udbdatasourcebind.htm">Create a UDBDataSource and bind it
with JNDI</a></li>
<li><a href="putgetdatalinks.htm">Datalink</a></li>
<li><a href="distinct.htm">Distinct types</a></li>
<li><a href="sqljex.htm">Embed SQL Statements</a></li>
<li><a href="jtatxend.htm">End a transaction</a></li>
<li><a href="invalidconnect.htm">Invalid user ID and password</a></li>
<li><a href="basicjdbc.htm">JDBC</a></li>
<li><a href="jtamulticonn.htm">Multiple connections that work on a transaction</a></li>
<li><a href="udbdatasourceuse.htm">Obtain an initial context before binding
UDBDataSource</a></li>
<li><a href="pmd.htm">ParameterMetaData</a></li>
<li><a href="usingpositionedupdate.htm">Remove values from a table through
another statement's cursor</a></li>
<li><a href="resultex.htm">ResultSet interface</a></li>
<li><a href="sensitive2.htm">ResultSet sensitivity</a></li>
<li><a href="sensitive.htm">Sensitive and insensitive ResultSets</a></li>
<li><a href="connectionpoolingsetup.htm">Set up connection pooling with
UDBDataSource and UDBConnectionPoolDataSource</a></li>
<li><a href="exceptionexample.htm">SQLException</a></li>
<li><a href="jtatxsuspend.htm">Suspend and resume a transaction</a></li>
<li><a href="jtatxeffect.htm">Suspended ResultSets</a></li>
<li><a href="connectionpoolingtest.htm">Test the performance of connection
pooling</a></li>
<li><a href="statementpoolingtest.htm">Test the performance of two DataSources</a></li>
<li><a href="updateblobs.htm">Update BLOBs</a></li>
<li><a href="updateclobs.htm">Update CLOBs</a></li>
<li><a href="jtamultitx.htm">Use a connection with multiple transactions</a></li>
<li><a href="useblobs.htm">Use BLOBs</a></li>
<li><a href="useclobs.htm">Use CLOBs</a></li>
<li><a href="crdb2cac.htm">Use DB2CachedRowSet properties and DataSources</a></li>
<li><a href="crdb2cac.htm">Use DB2CachedRowSet properties and JDBC URLs</a></li>
<li><a href="jtacommit.htm">Use JTA to handle a transaction</a></li>
<li><a href="safegetudts.htm">Use metadata ResultSets that have more than
one column</a></li>
<li><a href="getconnections.htm">Use native JDBC and IBM Toolbox for Java JDBC
concurrently</a></li>
<li><a href="prepex.htm">Use PreparedStatement to obtain a ResultSet</a></li>
<li><a href="crdb2cac.htm">Use the execute(Connection) method to use an
existing database connection</a></li>
<li><a href="crdb2cac.htm">Use the execute(int) method to batch database
requests together</a></li>
<li><a href="crdb2cac.htm">Use the populate method</a></li>
<li><a href="crdb2cac.htm">Use the setConnection(Connection) method to
use an existing database connection</a></li>
<li><a href="stateex.htm">Use the Statement object's executeUpdate method</a></li>
</ul>
<p><strong>Java Authentication and Authorization Service</strong></p>
<ul><li><a href="jaaswrld.htm">JAAS HelloWorld example</a></li>
<li><a href="sampthrd.htm">JAAS SampleThreadSubjectLogin example</a></li>
</ul>
<p><strong>Java Generic Security Service</strong></p>
<ul><li><a href="rzahajgsssrcl.htm">Sample non-JAAS client program</a></li>
<li><a href="rzahajgsssrsr.htm">Sample non-JAAS server program</a></li>
<li><a href="rzahajgssjacl.htm">Sample JAAS-enabled client program</a></li>
<li><a href="rzahajgssjasr.htm">Sample JAAS-enabled server program</a></li>
</ul>
<p><strong>Java Secure Sockets Extension</strong></p>
<ul><li><a href="rzahajsseexmpls.htm">SSL client and server using an SSLContext
object</a></li>
</ul>
<p><strong>Java with other programming languages</strong></p>
<ul><li><a href="callclex.htm">Call a CL program</a></li>
<li><a href="clcommex.htm">Call a CL command</a></li>
<li><a href="jvlngex1.htm">Call another Java program</a></li>
<li><a href="callcex.htm">Call Java from C</a></li>
<li><a href="calrpgex.htm">Call Java from RPG</a></li>
<li><a href="iostrmex.htm">Input and output streams</a></li>
<li><a href="invapiex.htm">Invocation API</a></li>
<li><a href="rzahapaseexmpls.htm"><span class="keyword">i5/OS™</span> PASE
native method for Java</a></li>
<li><a href="socketex.htm">Sockets</a></li>
<li><a href="jniex.htm">Use the Java Native Interface for native methods</a></li>
</ul>
<p><strong>Performance tools</strong></p>
<ul><li><a href="runjpdex.htm">Java Performance Data Converter</a></li>
</ul>
<p><strong>SQLJ</strong></p>
<ul><li><a href="sqljex.htm">Embed SQL Statements in your Java application</a></li>
</ul>
<p><strong>Secure sockets layer</strong></p>
<ul><li><a href="sslcex01.htm">Socket factories</a></li>
<li><a href="sslcex03.htm">Server socket factories</a></li>
<li><a href="sslcex02.htm">Secure sockets layer</a></li>
<li><a href="sslcex04.htm">Secure sockets layer server</a></li>
</ul>
<p>IBM grants you a nonexclusive copyright license to use all programming
code examples from which you can generate similar function tailored to your
own specific needs.</p>
<p><img src="./delta.gif" alt="Start of change" />SUBJECT TO ANY STATUTORY WARRANTIES WHICH
CANNOT BE EXCLUDED, IBM, ITS PROGRAM DEVELOPERS AND SUPPLIERS MAKE NO WARRANTIES
OR CONDITIONS EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, AND NON-INFRINGEMENT, REGARDING THE PROGRAM OR TECHNICAL SUPPORT,
IF ANY. <img src="./deltaend.gif" alt="End of change" /></p>
<p><img src="./delta.gif" alt="Start of change" />UNDER NO CIRCUMSTANCES IS IBM, ITS PROGRAM DEVELOPERS
OR SUPPLIERS LIABLE FOR ANY OF THE FOLLOWING, EVEN IF INFORMED OF THEIR POSSIBILITY: <img src="./deltaend.gif" alt="End of change" /></p>
<img src="./delta.gif" alt="Start of change" /><ol><li>LOSS OF, OR DAMAGE TO, DATA;</li>
<li>DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES, OR FOR ANY ECONOMIC
CONSEQUENTIAL DAMAGES; OR </li>
<li>LOST PROFITS, BUSINESS, REVENUE, GOODWILL, OR ANTICIPATED SAVINGS.</li>
</ol><img src="./deltaend.gif" alt="End of change" />
<p><img src="./delta.gif" alt="Start of change" />SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION
OF DIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, SO SOME OR ALL OF THE ABOVE
LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.<img src="./deltaend.gif" alt="End of change" /></p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="intdatex.htm">Example: Internationalization of dates using the java.util.DateFormat class</a></strong><br />
This example shows how you can use locales to format dates.</li>
<li class="ulchildlink"><strong><a href="intnumex.htm">Example: Internationalization of numeric display using the java.util.NumberFormat class</a></strong><br />
This example shows how you can use locales to format numbers.</li>
<li class="ulchildlink"><strong><a href="intlocex.htm">Example: Internationalization of locale-specific data using the java.util.ResourceBundle class</a></strong><br />
This example shows how you can use locales with resource bundles to internationalize program strings.</li>
<li class="ulchildlink"><strong><a href="accesspropertytest.htm">Example: Access property</a></strong><br />
This is an example of how to use the Access property.</li>
<li class="ulchildlink"><strong><a href="putgetblobs.htm">Example: BLOB</a></strong><br />
This is an example of how a BLOB can be put into the database or retrieved from the database.</li>
<li class="ulchildlink"><strong><a href="callex.htm">Example: CallableStatement interface for IBM Developer Kit for Java</a></strong><br />
This is an example of how to use the CallableStatement interface.</li>
<li class="ulchildlink"><strong><a href="usingpositioneddelete.htm">Example: Remove values from a table through another statement's cursor</a></strong><br />
This is an example of how to remove values from a table through another statement's cursor.</li>
<li class="ulchildlink"><strong><a href="putgetclobs.htm">Example: CLOB</a></strong><br />
This is an example of how a CLOB can be put into the database or retrieved from the database.</li>
<li class="ulchildlink"><strong><a href="udbdatasourcebind.htm">Example: Create a UDBDataSource and bind it with JNDI</a></strong><br />
This is an example of how to create a UDBDataSource and get it bound with JNDI.</li>
<li class="ulchildlink"><strong><a href="udbdatasourceuse2.htm">Example: Create a UDBDataSource, and obtain a user ID and password</a></strong><br />
This is an example of how to create a UDBDataSource, and use the getConnection method to obtain a user ID and password at runtime.</li>
<li class="ulchildlink"><strong><a href="udbdatasourcebind2.htm">Example: Create a UDBDataSourceBind and set DataSource properties</a></strong><br />
This is an example of how to create a UDBDataSource, and set the user ID and password as DataSource properties.</li>
<li class="ulchildlink"><strong><a href="dataex.htm">Example: DatabaseMetaData interface for IBM Developer Kit for Java - Return a list of tables</a></strong><br />
This example shows how to return a list of tables.</li>
<li class="ulchildlink"><strong><a href="putgetdatalinks.htm">Example: Datalink</a></strong><br />
This is an example of how to use datalinks in your applications.</li>
<li class="ulchildlink"><strong><a href="distinct.htm">Example: Distinct types</a></strong><br />
This is an example of how to use distinct types.</li>
<li class="ulchildlink"><strong><a href="sqljex.htm">Example: Embed SQL Statements in your Java application</a></strong><br />
The following example SQLJ application, App.sqlj, uses static SQL
to retrieve and update data from the EMPLOYEE table of the DB2<sup>®</sup> sample database.</li>
<li class="ulchildlink"><strong><a href="jtatxend.htm">Example: End a transaction</a></strong><br />
This is an example of ending a transaction in your application.</li>
<li class="ulchildlink"><strong><a href="invalidconnect.htm">Example: Invalid user ID and password</a></strong><br />
This is an example of how to use the Connection property in SQL naming mode.</li>
<li class="ulchildlink"><strong><a href="basicjdbc.htm">Example: JDBC</a></strong><br />
This is an example of how to use the BasicJDBC program.</li>
<li class="ulchildlink"><strong><a href="jtamulticonn.htm">Example: Multiple connections that work on a transaction</a></strong><br />
This is an example of how to use multiple connections working on a single transaction.</li>
<li class="ulchildlink"><strong><a href="udbdatasourceuse.htm">Example: Obtain an initial context before binding UDBDataSource</a></strong><br />
The following example obtains an initial context before binding the UDBDataSource. The lookup method is then used on that context to return an object of type DataSource for the application to use.</li>
<li class="ulchildlink"><strong><a href="pmd.htm">Example: ParameterMetaData</a></strong><br />
This is an example of using the ParameterMetaData interface to retrieve information about parameters.</li>
<li class="ulchildlink"><strong><a href="usingpositionedupdate.htm">Example: Change values with a statement through another statement's cursor</a></strong><br />
This is an example of how to change values with a statement through another statement's cursor.</li>
<li class="ulchildlink"><strong><a href="resultex.htm">Example: ResultSet interface for IBM Developer Kit for Java</a></strong><br />
This is an example of how to use the ResultSet interface.</li>
<li class="ulchildlink"><strong><a href="sensitive2.htm">Example: ResultSet sensitivity</a></strong><br />
The following example shows how a change can affect a where clause of an SQL statement based on the sensitivity of the ResultSet.</li>
<li class="ulchildlink"><strong><a href="sensitive.htm">Example: Sensitive and insensitive ResultSets</a></strong><br />
The following example shows the difference between sensitive and insensitive ResultSets when rows are inserted into a table.</li>
<li class="ulchildlink"><strong><a href="connectionpoolingsetup.htm">Example: Set up connection pooling with UDBDataSource and UDBConnectionPoolDataSource</a></strong><br />
This is an example of how to use connection pooling with UDBDataSource and UDBConnectionPoolDataSource.</li>
<li class="ulchildlink"><strong><a href="exceptionexample.htm">Example: SQLException</a></strong><br />
This is an example of catching an SQLException and dumping all the information that it provides.</li>
<li class="ulchildlink"><strong><a href="jtatxsuspend.htm">Example: Suspend and resume a transaction</a></strong><br />
This is an example of a transaction that is suspended and then is resumed.</li>
<li class="ulchildlink"><strong><a href="jtatxeffect.htm">Example: Suspended ResultSets</a></strong><br />
This is an example of the how a Statement object is reprocessed under another transaction to perform work.</li>
<li class="ulchildlink"><strong><a href="connectionpoolingtest.htm">Example: Test the performance of connection pooling</a></strong><br />
This is an example of how to test the performance of the pooling example against the performance of the non-pooling example.</li>
<li class="ulchildlink"><strong><a href="statementpoolingtest.htm">Example: Test the performance of two DataSources</a></strong><br />
This is an example of testing one DataSource that uses connection pooling only and the other DataSource that uses statement and connection pooling.</li>
<li class="ulchildlink"><strong><a href="updateblobs.htm">Example: Update BLOBs</a></strong><br />
This is an example of how to update BLOBs in your applications.</li>
<li class="ulchildlink"><strong><a href="updateclobs.htm">Example: Update CLOBs</a></strong><br />
This is an example of how to update CLOBs in your applications.</li>
<li class="ulchildlink"><strong><a href="jtamultitx.htm">Example: Use a connection with multiple transactions</a></strong><br />
This is an example of how to use a single connection with multiple transactions.</li>
<li class="ulchildlink"><strong><a href="useblobs.htm">Example: Use BLOBs</a></strong><br />
This is an example of how to use BLOBs in your applications.</li>
<li class="ulchildlink"><strong><a href="useclobs.htm">Example: Use CLOBs</a></strong><br />
This is an example of how to use CLOBs in your applications.</li>
<li class="ulchildlink"><strong><a href="jtacommit.htm">Example: Use JTA to handle a transaction</a></strong><br />
This is an example of how to use the Java Transaction API (JTA) to handle a transaction
in an application.</li>
<li class="ulchildlink"><strong><a href="safegetudts.htm">Example: Use metadata ResultSets that have more than one column</a></strong><br />
This is an example of how to use metadata ResultSets that have more than one column.</li>
<li class="ulchildlink"><strong><a href="getconnections.htm">Example: Use native JDBC and IBM Toolbox for Java JDBC concurrently</a></strong><br />
This is an example of how to use the native JDBC connection and
the IBM Toolbox
for Java JDBC
connection in a program.</li>
<li class="ulchildlink"><strong><a href="prepex.htm">Example: Use PreparedStatement to obtain a ResultSet</a></strong><br />
This is an example of using a PreparedStatement object's executeQuery method to obtain a ResultSet.</li>
<li class="ulchildlink"><strong><a href="crdb2cac.htm">Create and populate a DB2CachedRowSet</a></strong><br />
There are several ways to place data into a DB2CachedRowSet.</li>
<li class="ulchildlink"><strong><a href="stateex.htm">Example: Use the Statement object's executeUpdate method</a></strong><br />
This is an example of how to use the Statement object's executeUpdate method.</li>
<li class="ulchildlink"><strong><a href="jaaswrld.htm">Examples: JAAS HelloWorld</a></strong><br />
These examples show you the three files that are needed to compile and run HelloWorld for JAAS.</li>
<li class="ulchildlink"><strong><a href="sampthrd.htm">Example: JAAS SampleThreadSubjectLogin</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rzahajgsssrcl.htm">Sample: IBM JGSS non-JAAS client program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rzahajgsssrsr.htm">Sample: IBM JGSS non-JAAS server program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rzahajgssjacl.htm">Sample: IBM JGSS JAAS-enabled client program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rzahajgssjasr.htm">Sample: IBM JGSS JAAS-enabled server program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rzahajsseexmpls.htm">Examples: IBM Java Secure Sockets Extension</a></strong><br />
The JSSE examples show how a client and a server can use the native iSeries™ JSSE
provider to create a context that enables secure communications.</li>
<li class="ulchildlink"><strong><a href="callclex.htm">Example: Call a CL program with java.lang.Runtime.exec()</a></strong><br />
This example shows how to run CL programs from within a Java program.
In this example, the Java class CallCLPgm runs a CL program.</li>
<li class="ulchildlink"><strong><a href="clcommex.htm">Example: Call a CL command with java.lang.Runtime.exec()</a></strong><br />
This example shows how to run a control language (CL) command from
within a Java program.</li>
<li class="ulchildlink"><strong><a href="jvlngex1.htm">Example: Call another Java program with java.lang.Runtime.exec()</a></strong><br />
This example shows how to call another Java program with java.lang.Runtime.exec().
This class calls the Hello program that is shipped as part of the IBM Developer
Kit for Java. When the Hello class writes to System.out, this
program gets a handle to the stream and can read from it.</li>
<li class="ulchildlink"><strong><a href="callcex.htm">Example: Call Java from C</a></strong><br />
This is an example of a C program that uses the system() function
to call the Java Hello program.</li>
<li class="ulchildlink"><strong><a href="calrpgex.htm">Example: Call Java from RPG</a></strong><br />
This is an example of an RPG program that uses the QCMDEXC API
to call the Java Hello program.</li>
<li class="ulchildlink"><strong><a href="iostrmex.htm">Example: Use input and output streams for interprocess communication</a></strong><br />
This example shows how to call a C program from Java and
use input and output streams for interprocess communication.</li>
<li class="ulchildlink"><strong><a href="invapiex.htm">Example: Java Invocation API</a></strong><br />
This example follows the standard Invocation API paradigm.</li>
<li class="ulchildlink"><strong><a href="rzahapaseexmpls.htm">Example: IBM i5/OS PASE native method for Java</a></strong><br />
The IBM <span class="keyword">i5/OS</span> PASE native method for Java example
calls an instance of a native C method that then uses Java Native
Interface (JNI) to call back into Java code. Rather than accessing the string
directly from Java code, the example calls a native method that then
calls back into Java through JNI to get the string value. </li>
<li class="ulchildlink"><strong><a href="jniex.htm">Examples: Use the Java Native Interface for native methods</a></strong><br />
This example program is a simple Java Native Interface (JNI) example in which
a C native method is used to display "Hello, World." Use the <samp class="codeph">javah</samp> tool
with the NativeHello class file to generate the NativeHello.h file. This example
assumes that the NativeHello C implementation is part of a service program
that is called NATHELLO.</li>
<li class="ulchildlink"><strong><a href="socketex.htm">Example: Use sockets for interprocess communication</a></strong><br />
This example uses sockets to communicate between a Java program
and a C program. </li>
<li class="ulchildlink"><strong><a href="runjpdex.htm">Example: Run the Java Performance Data Converter</a></strong><br />
You can either use the iSeries™ command line or the Qshell environment
to run the Java Performance Data Converter (JPDC).</li>
<li class="ulchildlink"><strong><a href="sslcex01.htm">Examples: Change your Java code to use client socket factories</a></strong><br />
These examples show you how to change a simple socket class, named simpleSocketClient, so that it uses socket factories to create all of the sockets. The first example shows you the simpleSocketClient class without socket factories. The second example shows you the simpleSocketClient class with socket factories. In the second example, simpleSocketClient is renamed to factorySocketClient.</li>
<li class="ulchildlink"><strong><a href="sslcex03.htm">Examples: Change your Java code to use server socket factories</a></strong><br />
These examples show you how to change a simple socket class, named simpleSocketServer, so that it uses socket factories to create all of the sockets. The first example shows you the simpleSocketServer class without socket factories. The second example shows you the simpleSocketServer class with socket factories. In the second example, simpleSocketServer is renamed to factorySocketServer.</li>
<li class="ulchildlink"><strong><a href="sslcex02.htm">Examples: Change your Java client to use secure sockets layer</a></strong><br />
These examples show you how to change one class, named factorySocketClient, to use secure sockets layer (SSL). The first example shows you the factorySocketClient class not using SSL. The second example shows you the same class, renamed factorySSLSocketClient, using SSL.</li>
<li class="ulchildlink"><strong><a href="sslcex04.htm">Examples: Change your Java server to use secure sockets layer</a></strong><br />
These examples show you how to change one class, named factorySocketServer, to use secure sockets layer (SSL).</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="whatitis.htm" title="Java compatibleIBM Developer Kit for Java is optimized for use in an iSeries server environment. It uses the compatibility of Java programming and user interfaces, so you can develop your own applications for the iSeries server.">IBM Developer Kit for Java</a></div>
</div>
</div>
</body>
</html>