You can run an iSeries Java program remotely in the iSeries
Java Transform and Run view or in the Launch Configurations window.
Any Java program that you run must be an application (a class
that contains a main method).
Before you can run an iSeries Java program,
you must export Java class files to an iSeries integrated file system directory.
Java source files are required on an iSeries server to debug iSeries Java
programs.
- In the Launch Configurations window you run a program that you have exported
to an iSeries server and you also store locally. (Launch configurations are
Eclipse mechanisms for saving and reusing the settings that you use when you
run or debug different types of objects.)
- In the iSeries Java Transform and Run view you call the program from the
server; the view is independent of the local workspace.
In the iSeries Java Transform and Run view
- Open a Java perspective if one is not currently available: Click
.
- Switch to the Transform and Run view:
- Click the down arrow next to the run icon
on the workbench menu bar.
- Select .
- To populate the Working Folder field, click
Browse to select a directory in the Browse
For Folder window.
- Optional: Click Advanced Options to specify
program parameters, properties, and iSeries run options. In the Select
iSeries Options window, choose the properties you want and click
OK. The options are described in the related references
below.
- Click the Run remotely tab.
- In the Class field, enter the name of the
class file.
- Click Run to start the remote invocation.
The Console out field displays output or any errors.
- Use the Console in field to enter information
for the program (if the program asks for input). Data entered in this field
is passed to the remote program when you press Enter.
The Java application runs on the iSeries server. At any time while
the program is running, you can click Stop. Click
Clear Console to clear the Console out field.
In
the Launch Configurations window
- Open a Java perspective if one is not currently available: Click .
- Click the down arrow next to the run icon
on the workbench menu bar.
- Select Run. The Launch Configurations window opens.
- Click Java application in iSeries server. Click
New.
- Optional: Give the configuration a name.
- Under the Main tab, fill in the name of the project
and the name of the Main class in your project. Browse to the Remote
iSeries working folder, enter the name, or select the name from
the drop-down list. This is the IFS folder containing the remote package,
or the class itself if the class does not have a package.
- Optional: Use the other tabs to add parameters, set class path, and so
on.
- Click Run to run the program.
After you define a configuration, it appears as a shortcut in the
down-arrow menu.
If the Java class file is on the IFS, you can run it in the Remote
Shell view. In the Remote System Explorer, right-click the IFS Files subsystem
under the connection and select Launch Shell. See the
related task on working with command shells.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.