Generating adapter classes, Project build or rebuild function, Running the program – FUJITSU J Adapter Class Generator User Manual

Page 82

Advertising
background image

82 Chapter 7. Samples

Generating adapter classes
Generate adapter classes using the java2cob command.

java2cob java. lang. Object

[1]

java2cob java.lang. System

[2]

java2cob java. until. Data

[3]

1. Generate an adapter class of the java.lang.Object class (required for calling

Java).

2. Generate an adapter class of the java.lang.System class used for standard

output. An adapter class of the java.util.PrintStream class referenced from the

java.lang.System class is also generated.

3. Generate an adapter class of the java.util.Date class.
Project build or rebuild function
This section explains how to create an executable program using the build function

of the project manager. Refer to the “Fujitsu COBOL User’s Guide” for detailed

information on how to use the project manager.
1. When using Java(JDK 1.1.x), open project file “DATE01JAVA.PRJ”. When using

Java2(J2SDK 1.2.2 or later), open project file “DATE01JAVA2.PRJ”.

2. Select “Build” from the “Project“ menu. An adapter class DLL (DATE.DLL) is

generated.

3. Open project file “DATEMAIN.PRJ.”
4. Select “Build” from the “Project“ menu.
Running the program
Run the executable program from the MS-DOS prompt. The date and time are

displayed.

Advertising