Stuff
OS/400 Edition
Volume 1, Number 16 -- September 12, 2002

Java by Example with WebSphere Development Studio Client


by Shannon O'Donnell

If you still have not picked up the Java baton that IBM keeps trying to pass to you because you are not sure where to begin with Java, then I have great news for you! Contained within the new WebSphere Development Studio Client 4.0 is a set of Java examples that you can begin using right away to learn how to use some of the most common Java classes for the iSeries.

display

Install the Tools

Before you can try out these Java examples, you will need to obtain and install the WebSphere Development Studio Client package. IBM began shipping WDSC in July with all V5R2 upgrades and new orders. OS/400 V5R1 customers can obtain the tools by ordering product number 5722-SS1xxx.

Once you have the WDSC tools, you will need to install them on your development PC. One caveat here is that, before you install WDSC, you must first uninstall the old version of the WebSphere Development Studio Tools on that PC. Don't worry about losing your source files. They will still reside in the default folder (x:\WDT400\).

When you install the new WDSC tools, the installation package will create a new folder named x:\WDSC\. For old versions of VARPG, or CODE/400 source members that you want to continue to work on, you may want to copy those source files to the WDSC directory for convenience, although you may also choose to leave them in the WDT400 directory. I mention this because the first time I installed WDSC and opened the VARPG projects shortcut, I couldn't find my old source members! That's because they were still in the old WDT400\xxx directory. Once I moved them to the WDSC\xxx directory, I was able to see them in the VARPG project folder.

Running the Java Examples

After you've installed the WDSC tools, checked for PTFs, and verified your connection to your AS/400 or iSeries, you are ready to try out the Java samples.

To get to them, open the IBM WebSphere Development Studio Client for iSeries menu item, then select the IBM WebSphere Studio Site Developer Advanced menu item.

Next, select the File menu item, followed by the New menu item, then the Project menu item.

To get to the iSeries Java sample code, click the Examples tree item, then click iSeries. (Alternatively, you can click any of the other sample tree items to view those sample applications.)

When you click the iSeries tree item, you'll notice that, in the right-hand pane of the GUI, two new detail items appear: Java Bean Examples and Toolbox Examples.

Click the ToolBox Examples to view a panel that allows you to run the sample application, which demonstrates how to use many of the most commonly needed AS/400 Java Toolbox classes. You can run these applications by connecting to your iSeries or AS/400 system.

What's really cool, though, is that you can create a new project that contains all of the source code for all of the sample programs! What could be easier than to have a sample application that demonstrates these Java classes, while at the same time having the actual source code that you can edit, modify and learn from?

Making Life Easier

I'm not going to kid you. Programming in Java for someone who has programmed only in RPG or COBOL for the last decade or so is no trivial matter. You will have to learn many new concepts and ways of thinking. IBM has finally begun to realize that. It has given you these great sample applications to learn from, along with the source code, so that you can spend less time simply trying to make a Java program work and more time learning why it works. Take a look at the new tools in the WebSphere Development Studio Client. There's a whole world of information there.


Sponsored By
ASNA

Why Roto-Rooter Uses ASNA Visual RPG for Development:

Roto-Rooter knew that the time had come to replace their green-screen technician dispatch system. When they selected ASNA Visual RPG (AVR) as their development environment, they realized they would be able to use their existing RPG programming skills. They also found that they were able to program even faster than with traditional RPG. Their new AVR application includes capabilities not possible in the green-screen app, such as graphical representations of technician schedules, easy to access menus, and tabs that allow easy movement from screen to screen. These capabilities make their new application much easier for their users to learn and use than the old green-screen version. Since the application now features more information on the screen at one time, in a format that is easier to read, users are able to see and correct scheduling conflicts more quickly than so they can provide a higher level of customer service.

"AVR has saved us so much time while working on our first visual application. I would say that we are able to cut our programming time, just for subfiles, in half and we use subfiles in over 90% of the programs that we have created for this project. It's really nice to be able to move our employees from dumb terminals to PCs and get them using more useful and user friendly applications."
  —Tom Duebber, Roto-Rooter

ASNA Visual RPG (AVR) for Web, Windows and .NET Development

ASNA Visual RPG is a true Windows-hosted RPG compiler. When you select AVR as your programming environment, you are preserving your development team's development skills as well as your shop's long-time investment in RPG. Because AVR is RPG-based, learning curves are amazingly low, even for green-screen veterans who have never written Web or Windows applications before. Couple AVR's easy learning curve with AVR's great documentation and ASNA's superb training classes (offered at ASNA's San Antonio, Texas headquarters and at ASNA's European headquarters in the UK) and your team will be creating problem-solving applications faster than you ever thought possible—and orders of magnitude faster than any competing development tool.

Download your FREE copy of AVR today!

http://www.asna.com/downloads.asp


THIS ISSUE
SPONSORED BY:

ASNA
T.L. Ashford
ASC
COMMON
Profound Logic Software
WorksRight Software


BACK ISSUES

TABLE OF CONTENTS
Java by Example with WebSphere Development Studio Client

DB2 Library Contents in Operations Navigator

Processing Command-Line Arguments in Qshell Scripts

How to Create Custom JSP Tags

Calling PC Commands from RPG

A Telnet Exit Program Tells You Who's Knocking At Your Door


Editors
Shannon O'Donnell
Kevin Vandever

Managing Editor
Shannon Pastore

Contributing Editors:
Howard Arner
Joe Hertvik
Ted Holt
David Morris
Richard Shaler

Publisher and
Advertising Director:

Jenny Thomas

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com



Last Updated: 9/12/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.