Fujitsu J Adapter Class Generator User Manual page 84

Fujitsu user's guide j adapter class generator
Table of Contents

Advertisement

84
Chapter 7. Samples
Generating adapter classes
Generate adapter classes using the java2cob command.
java2cob -r java.lang.System -gf out \
-r java.io.PrintStream -gm "println(java.lang.Object)" \
-r java.util.Date -gc "Date()"
Note: "\" shows the continuance line.
1. Generate an adapter class of the java.lang.System class that contains the out
field used for standard output.
2. Generate an adapter class of the java.io.PrintStream class that contains the
println(java.lang.Object) method used for standard output.
3. Generate an adapter class of the java.util.Date class that contains the Date()
constructor.
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 "DATE02JAVA.PRJ". When using
Java2(J2SDK 1.2.2 or later), open project file "DATE02JAVA2.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 a program
Run the executable program from the MS-DOS prompt. The date and time are
displayed.
[1]
[2]
[3]

Advertisement

Table of Contents
loading

Table of Contents