101 lines
6.3 KiB
HTML
101 lines
6.3 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="task" />
|
||
|
<meta name="DC.Title" content="Creating and running a ToolboxME for iSeries program" />
|
||
|
<meta name="abstract" content="This information will enable you to edit, compile, and run the example ToolboxME for iSeries program." />
|
||
|
<meta name="description" content="This information will enable you to edit, compile, and run the example ToolboxME for iSeries program." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="micromain.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="microfirstprogcode.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="microfirstprog" />
|
||
|
<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>Creating and running a ToolboxME for iSeries program</title>
|
||
|
</head>
|
||
|
<body id="microfirstprog"><a name="microfirstprog"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Creating and running a ToolboxME for iSeries program</h1>
|
||
|
<div><p>This information will enable you to edit, compile, and run the
|
||
|
example ToolboxME for iSeries™ program. </p>
|
||
|
<div class="section"><p>You can also use this information as a general guide for creating,
|
||
|
testing, and running the <a href="microexamples.htm#microexamples">ToolboxME
|
||
|
for iSeries working
|
||
|
examples</a> and your own ToolboxME for iSeries applications.</p>
|
||
|
<p>The example
|
||
|
program uses the K Virtual Machine (KVM) and allows the user to perform any
|
||
|
JDBC query. The user can then perform JDBC actions (next, previous, close,
|
||
|
commit, and rollback) against the result of the query.</p>
|
||
|
<p>Before you begin
|
||
|
creating any of the ToolboxME for iSeries examples, make sure that your
|
||
|
environment meets the <a href="microrequire.htm#microrequire">ToolboxME
|
||
|
for iSeries requirements</a>.</p>
|
||
|
<p id="microfirstprog__createprogram"><a name="microfirstprog__createprogram"><!-- --></a><strong>Creating the ToolboxME for iSeries example</strong></p>
|
||
|
<p>To create the
|
||
|
ToolboxME for iSeries example
|
||
|
program for your Tier0 device, complete the following steps:</p>
|
||
|
</div>
|
||
|
<ol><li class="stepexpand"><span><a href="microfirstprogcode.htm#microfirstprogcode">Copy the Java™ code
|
||
|
for the ToolboxME for iSeries example</a>, called JdbcDemo.java.</span></li>
|
||
|
<li class="stepexpand"><span>In your chosen text or Java editor, change the portions of the
|
||
|
code as indicated in the program comments and save the file with the name
|
||
|
JdbcDemo.java.</span> <div class="note"><span class="notetitle">Note:</span> Consider using a wireless application development
|
||
|
tool, which makes it easier to complete the remaining steps. Some wireless
|
||
|
application development tools may compile, preverify, and build your program
|
||
|
in a single step, then automatically run it in an emulator.</div>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Compile JdbcDemo.java, making sure you point to the .jar file that
|
||
|
contains the KVM classes.</span></li>
|
||
|
<li class="stepexpand"><span>Preverify the executable file, either by using your wireless application
|
||
|
development tool or by using the Java preverify command.</span></li>
|
||
|
<li class="stepexpand"><span>Build the appropriate type of executable file for the operating
|
||
|
system of your Tier0 device. For example, for the Palm OS, you build a file
|
||
|
called JdbcDemo.prc. </span></li>
|
||
|
<li class="stepexpand"><span>Test the program. If you have installed an emulator, you can test
|
||
|
the program and see what it will look like by running it in the emulator.</span> <div class="note"><span class="notetitle">Note:</span> If you test the program on your wireless device and you do not
|
||
|
use a wireless application development tool, make sure that you preinstall
|
||
|
your chosen Java virtual machine or MIDP on the device.</div>
|
||
|
</li>
|
||
|
</ol>
|
||
|
<div class="section"><p>See <a href="microconcept.htm#microconcept">ToolboxME for iSeries concepts</a> for
|
||
|
related information about concepts, wireless application development tools,
|
||
|
and emulators.</p>
|
||
|
<p id="microfirstprog__runprogram"><a name="microfirstprog__runprogram"><!-- --></a><strong>Running the ToolboxME for iSeries example</strong></p>
|
||
|
<p>To
|
||
|
run the ToolboxME for iSeries example program on your Tier0 device, complete
|
||
|
the following tasks:</p>
|
||
|
<ul><li>Load the executable file to the device, using the instructions provided
|
||
|
by your Tier0 device manufacturer.</li>
|
||
|
<li>Start the <a href="micromeserver.htm#micromeserver">MEServer</a></li>
|
||
|
<li>Run the JdbcDemo program on your Tier0 device by clicking the JdbcDemo
|
||
|
icon.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="microfirstprogcode.htm">ToolboxME for iSeries example: JdbcDemo.java</a></strong><br />
|
||
|
To create this example as a working ToolboxME for iSeries program,
|
||
|
you need to copy the following .java file into a text or Java editor,
|
||
|
make a few changes, then compile it.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="micromain.htm" title="The IBM Toolbox for Java 2 Micro Edition package (com.ibm.as400.micro) enables you to write Java programs that allow a variety of Tier0 wireless devices, like personal digital assistants (PDAs) and cell phones, to directly access iSeries data and resources.">IBM Toolbox for Java 2 Micro Edition</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|