Manual Fujitsu J Adapter Class Generator

98 pages 2.1 mb
Download

Go to site of 98

Summary
  • Fujitsu J Adapter Class Generator - page 1

    J Adapter Class Generator User’s Guide ...

  • Fujitsu J Adapter Class Generator - page 2

    Seventh Edition: August 2005 The contents of this manual may be revised withou t prior notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express writte n permission of Fujitsu Limited. © 1996-2005 Fujitsu Limited. All Rights Reserved. ...

  • Fujitsu J Adapter Class Generator - page 3

    Preface The "NetCOBOL J Adapter Class Generator " is a tool that generates a COBOL class (adapter class) used to call a Java class. Using the adapter class thus generated makes the Java class library available from COBOL. A Java runtime environment must be inst alled to execute the generator or the adapter class generated. See " Prep ...

  • Fujitsu J Adapter Class Generator - page 4

    Chapter 5. Adapter Class Reference Chapter 5 provides detailed information on the FJ-JAVA-BASE, FJ-JAVA-CONTROL and FJ-JAVA-ERROR classes provided by th e J adapter class generator, and adapter classes generated by the J adapter class generator. Appendix A. Message List Appendix A explains the messages output by the J adapter class generator, inclu ...

  • Fujitsu J Adapter Class Generator - page 5

    Registered Trademarks The registered trademarks appearin g in this manual are as follows: Microsoft, Windows, and Windows NT ar e registered trademarks of Microsoft Corporation in the U.S. and other countries. Java and other trademarks including Java are trademarks of Sun Microsystems, Inc. in the U.S. and other countries. J Adapter Class Generator ...

  • Fujitsu J Adapter Class Generator - page 6

    6 NetCOBOL J Adapter Class Generator User's Guide ...

  • Fujitsu J Adapter Class Generator - page 7

    NetCOBOL J Adapter Class Generat or User's Guide 7 Contents Chapter 1. Outline of J Adapter Class Generator ......................................... 9 What is the J Adapte r Class Gene rator? ...............................................................10 What the J Adapter Cla ss Generator Can Do ........................................... ...

  • Fujitsu J Adapter Class Generator - page 8

    8 NetCOBOL J Adapter Class Generator User's Guid e Messages Output duri ng Execut ion .....................................................................77 Chapter 7. Samples .................................................................................... 81 Sample 1 – Usin g Classe s ................................................... ...

  • Fujitsu J Adapter Class Generator - page 9

    Chapter 1. Outline of J Adapter Class Generator This chapter explains the function and op erating environment of the J adapter class generator. ...

  • Fujitsu J Adapter Class Generator - page 10

    10 Chapter 1. Outline of J Adapter Class Generator What is the J Adapter Class Generator? Taking advantage of the object-oriente d function, Fujitsu NetCOBOL enables programming using class libraries . The Fuji tsu NetCOBOL also provides many useful foundation classes. Meantime, as Java be comes popular, many Java class libraries are also provided. ...

  • Fujitsu J Adapter Class Generator - page 11

    Chapter 1. Outline of J Adapter Class Generator 11 The Java class interface must be converted into the COBOL interface for a COBOL program to use Java classes. The J adapter class generator generates an adapter class that converts the Java interface into the COBOL interface. What the J Adapter Class Generator Can Do Using adapter classes generated ...

  • Fujitsu J Adapter Class Generator - page 12

    12 Chapter 1. Outline of J Adapter Class Generator Therefore, the following restrictions apply to COBOL: - Listener Java registers a listener object, in which event processing logic is written, within an object that generates an event. However, since no COBOL object can be registered in a Java object, CO BOL cannot be used to write listeners. - Col ...

  • Fujitsu J Adapter Class Generator - page 13

    Chapter 2. Adapter Class Generator Framework This chapter explains the framework of the J adapter class generator. ...

  • Fujitsu J Adapter Class Generator - page 14

    14 Chapter 2. Adapter Class Generator Framework Adapter Class To make Java classes available to COBOL, a mechanism for converting the Java class interface into the COBOL interface is requ ired. The J adapter class generator works as an interface converting mechanism to generate adapter classes corresponding to Java classes. To use a Java class from ...

  • Fujitsu J Adapter Class Generator - page 15

    Chapter 2. Adapter Class Generator Framework 15 Adapter Object At execution time, an adapter class genera tes the adapter object corresponding to a Java instance object. The adapter object: Holds the pointer to the corresponding Java instance object. • • Calls the corresponding Java method of the corresponding Java instance object Only the adap ...

  • Fujitsu J Adapter Class Generator - page 16

    16 Chapter 2. Adapter Class Generator Framework ...

  • Fujitsu J Adapter Class Generator - page 17

    Chapter 3. Developing Programs This chapter explains how to develo p programs that use Java classes. ...

  • Fujitsu J Adapter Class Generator - page 18

    18 Chapter 3. Developing P rograms Creating Adapter Classes This section explains how to generate an adapter class from a Java class. Investigating the Java Class First investigate the specifications of the Ja va class and interface to be used (class name, package name, usage, and so on) to check whether the J adapter class generator can handle the ...

  • Fujitsu J Adapter Class Generator - page 19

    Chapter 3. Developi ng Programs 19 adapter classes when the class file is not available, see " Generating an adapter class when the class file is not available ." Building an Adapter Class Finally, compile and link-edit the generated ad apter class source to create an adapter class library (DLL). Use the COBOL project manager to do so. Re ...

  • Fujitsu J Adapter Class Generator - page 20

    20 Chapter 3. Developing P rograms Therefore, an adapter class cannot be generated normally without these class files. These class files may not be available depending on the environment. In this case, to create an adapter class normally, dummy class files having these file names must be prepared. Prepare a dummy class file as follows: 1. Create a ...

  • Fujitsu J Adapter Class Generator - page 21

    Chapter 3. Developi ng Programs 21 Example: When an application uses only the println (O bject) method of the java.io.PrintStream class, specify as follows: C:> java2cob -r java.io.PrintStream -gm "println(java.lang.Object)" Specifying the -om Option or the "Option ReduceClass" Parameter Specifying the -om option or the &quo ...

  • Fujitsu J Adapter Class Generator - page 22

    22 Chapter 3. Developing P rograms ... REPOSITORY. CLASS J-OBJECT AS "java-lang-Object" ... LINKAGE SECTION. 01 P1-OUTPUTSTREAM OBJECT REFERENCE J-OBJECT. ... Developing an Application That Uses an Adapter Class This section explains how to develop a program that uses an adapter class. Outline The flow of program processing using the adap ...

  • Fujitsu J Adapter Class Generator - page 23

    Chapter 3. Developi ng Programs 23 Terminating the Java VM When an adapter class is no longer used, the Java VM must be terminated. Use the JVM-TERMINATE method of the FJ-JAVA-CONTROL class to terminate the Java VM. A coding sample is shown below: ... REPOSITORY. CLASS FJ-JAVA-CONTROL ... PROCEDURE DIVISION. ... INVOKE FJ-JAVA-CONTROL "JVM-TER ...

  • Fujitsu J Adapter Class Generator - page 24

    24 Chapter 3. Developing P rograms An example of generating a Date class object is shown below: ... REPOSITORY. CLASS J-Date AS "java-util-Date" ... WORKING-STORAGE SECTION 01 anDate OBJECT REFERENCE J-Date. ... PROCEDURE DIVISION. ... INVOKE J-Date "Create-Date-01" RETURNING anDate. ... Note: • Since the adapter class name is ...

  • Fujitsu J Adapter Class Generator - page 25

    Chapter 3. Developi ng Programs 25 An example of referencing the class variable AM_PM_FIELD (static field) of the DateFormat class is shown below: ... REPOSITORY. CLASS J-DateFormat AS "java-text-DateFormat" ... WORKING-STORAGE SECTION 01 FMT-Type PIC S9(9) COMP-5. ... PROCEDURE DIVISION. ... MOVE JF-AM_PM_FIELD OF J-DateFormat TO FMT-Typ ...

  • Fujitsu J Adapter Class Generator - page 26

    26 Chapter 3. Developing P rograms An example of assigning an object, which has been referenced with Object class data, into Data class data is shown below: ... REPOSITORY. CLASS J-Object AS "java-lang-Object" CLASS J-Date AS "java-util-Date" ... WORKING-STORAGE SECTION 01 anDate OBJECT REFERENCE J-Date. 01 anObject OBJECT REFER ...

  • Fujitsu J Adapter Class Generator - page 27

    Chapter 3. Developi ng Programs 27 … When the -s option or the "Option String" parameter is specified, the conversion between the String object and the COBOL data items is not necessary since an alphanumeric item can be specified as the String type argument and returns a value directly. … REPOSITORY. CLASS J-Date AS "java-util-Da ...

  • Fujitsu J Adapter Class Generator - page 28

    28 Chapter 3. Developing P rograms If an adapter class is generated by specifying the -t option or the "Option Terminal" parameter, the character string that is sh orter than the data item length can be passed to a method without setting the end of string, since the end (X "00") of the character string is set in the adapter clas ...

  • Fujitsu J Adapter Class Generator - page 29

    Chapter 3. Developi ng Programs 29 DISPLAY "Error Code: " errCode. DISPLAY "Error Message: " errMessage(1:errMessageLen). IF rc NOT = -1 THEN DISPLAY "Java Class Name: " expClass(1:expClassLen) DISPLAY "Java Exception Message: " expMessage(1:expMessageLen) END-IF. END DECLARATIVES. … Note: When the exceptio ...

  • Fujitsu J Adapter Class Generator - page 30

    30 Chapter 3. Developing P rograms Conversion to Java2 When using the resources (execute-form programs (EXE), DLLs, adapter class source, and program source using adapter classes) created by JDK1.1.x, note the following: • Adapter class source and DLLs created by JDK 1.1.x can be used as they are in the Java2 environment. • If an adapter class ...

  • Fujitsu J Adapter Class Generator - page 31

    Chapter 4. Using the Generator Command This chapter explains how to use the ge nerator command (java2cob), optional file and output result. ...

  • Fujitsu J Adapter Class Generator - page 32

    32 Chapter 4. Using the Generat or Command Starting the J Adapter Class Generator Command Syntax When the constructor/method/field is not specified: java2cob [-classpath class-path ] [-d output-folder ] [-ov] [-om] [-oi] [-c{s|u}] [- s[ n ]] [-t] class-name/interface-name ... When the constructor/method/field is specified: java2cob [-classpath clas ...

  • Fujitsu J Adapter Class Generator - page 33

    Chapter 4. Using the Generat or Command 33 generated. When specifying two or more constructors, they must be delimited by comma (,) or a blank. When two or more constructors of the sa me name exist, only the constructor that matches the parameter type is generated by specifying the parameter-type. If a parameter type is omitted, all of the constr u ...

  • Fujitsu J Adapter Class Generator - page 34

    34 Chapter 4. Using the Generat or Command -om Specified to reduce the number of adapter cl asses generated. When this parameter is specified, the object reference types of all parameters excluding RETURNING become java-lang-Object. Instead, the pa rameter names are generated so that they include original type information (see "Specifying the ...

  • Fujitsu J Adapter Class Generator - page 35

    Chapter 4. Using the Generat or Command 35 name, replace the period "." of the internal class name with a dollar sign "$". More than one class name or interface name can be specified. Environment Variable CLASSPATH Specifies the Java class/interface search path. When -classpath is specified, the CLASSPATH environment variable is ...

  • Fujitsu J Adapter Class Generator - page 36

    36 Chapter 4. Using the Generat or Command Optional File The optional file is a text format file used to define generator options in a file instead of on the command line. The optional file is specified in a command line of the java2cob command. For example, specifying the many method names, etc. in the command line every time is troublesome during ...

  • Fujitsu J Adapter Class Generator - page 37

    Chapter 4. Using the Generat or Command 37 Notes on describing the optional file: • Clauses enclosed by square brackets can be omitted. • Curly brackets indicate selection of clause that is delimited by ”| ”. • Italic type indicates a variable character string. Class class-name/interface-name Specification format Class class-name/interfac ...

  • Fujitsu J Adapter Class Generator - page 38

    38 Chapter 4. Using the Generat or Command Option Code Specification format Option Code = { SJIS | UNICODE } Specification contents Specify a code system during execution time. Specify the same code system as that of the COBOL program that uses the Java class. When omitted, it is assumed that SJIS is specified. Meaning of the parameter • SJIS Spe ...

  • Fujitsu J Adapter Class Generator - page 39

    Chapter 4. Using the Generat or Command 39 Option MethodTable Specification format Option MethodTable { YES | NO } Specification contents Specify whether or not to output the method name cross-reference list file (list of adapter class methods that correspond to the Java class methods). If omitted, it is assumed that NO is specified. The method nam ...

  • Fujitsu J Adapter Class Generator - page 40

    40 Chapter 4. Using the Generat or Command Option ReduceClass Specification format Option ReduceClass = { YES | NO } Specification contents Specify whether or not to reduce the number of adapter classes. When YES is specified, the type of object reference except RETURNING becomes java-lang-Object, and the parameter name is generated so as to includ ...

  • Fujitsu J Adapter Class Generator - page 41

    Chapter 4. Using the Generat or Command 41 Option Terminal Specification format Option Terminal = { YES | NO } Specification contents Specify whether or not to generate an adapter class allowed to set end character strings, for the method that has string -type fields and string-type parameters. (Refer to "End control of character string." ...

  • Fujitsu J Adapter Class Generator - page 42

    42 Chapter 4. Using the Generat or Command Output The generator outputs the following files: • Adapter class source file • Generation name management file • Method name cross-reference list file Adapter Class Source File The adapter class source file corresponding to the specified Java class or interface is generated. If the specified class o ...

  • Fujitsu J Adapter Class Generator - page 43

    Chapter 4. Using the Generat or Command 43 Figure 4.1 Generation Name Management File The J adapter class generator uses a gene ration name management file to manage the correspondence between the names used in Java classes and adapter classes. The generation name management file is ge nerated with the following name in the adapter class output fol ...

  • Fujitsu J Adapter Class Generator - page 44

    44 Chapter 4. Using the Generat or Command A method name cross-reference list file is output in the following format: [Java] java-class-name [COBOL] cobol-external-class-name (1) [Java] type java-method-name (argument-type) [COBOL] cobol-external-method-name (2) [Java] type java-method-name (argument-type) OVERRIDE [COBOL] -None- ... (n) [Java] typ ...

  • Fujitsu J Adapter Class Generator - page 45

    Chapter 5. Adapter Class Reference This chapter provides detailed informatio n on the FJ-JAVA-BASE, FJ-JAVA-CONTROL and FJ-JAVA-ERROR classes provided by th e J adapter class generator, and adapter classes generated by the J adapter class generator. ...

  • Fujitsu J Adapter Class Generator - page 46

    46 Chapter 5. Adapter Class Ref erence Class Configuration The figure below shows the hierarchical re lationships among the FJ-JAVA-BASE, FJ- JAVA-CONTROL and FJ-JAVA-ERROR classe s provided by the J adapter class generator, and adapter classes generated by the J adapter class generator. Figure 5.0.1 Class Hierarchy • FJ-JAVA-BASE: Super class of ...

  • Fujitsu J Adapter Class Generator - page 47

    Chapter 5. Adapter Class Ref erence 47 FJ-JAVA-BASE class The FJ-JAVA-BASE class is the super class of every adapter class. The FJ-JAVA-BASE class has the methods shown below. Method name Type Function J-NARROW Factory Assigns an object to a subclass. J-DUPLICATE Object Duplicates an adapter object. J-EQUALS Object Checks whether the Ja va objects ...

  • Fujitsu J Adapter Class Generator - page 48

    48 Chapter 5. Adapter Class Ref erence J-EQUALS Method (object method) Explanation This method checks whether the Java objects indicated by two adapter objects are equal. Syntax INVOKE object-1 "J-EQUALS" USING object-2 RETURNING result Parameter and return value • object-1, object-2 (attribute: OBJECT REFERENCE FJ-JAVA-BASE) Specifies ...

  • Fujitsu J Adapter Class Generator - page 49

    Chapter 5. Adapter Class Ref erence 49 Environment variable name Function COBJNI_MAX_NSTACK Specifies the maximum size (bytes) of the stack used for the native code. The default is 128 kilobytes. COBJNI_JAVA_STACK Specifies the maximum size (bytes) of the stack used for the Java code. The default is 400 kilobytes. COBJNI_MIN_HEAP Specifies the star ...

  • Fujitsu J Adapter Class Generator - page 50

    50 Chapter 5. Adapter Class Ref erence FJ-JAVA-ERROR class The adapter class generates the exception object when some error is detected during execution period. The FJ-JAVA-ERRO R class is the class of that exception object. The exception message, exception type and exception information of Java can be acquired by using the FJ-JAVA-ERROR class meth ...

  • Fujitsu J Adapter Class Generator - page 51

    Chapter 5. Adapter Class Ref erence 51 GET-EXCEPTION method (object method) Explanation The Java exception information is returned. Syntax INVOKE EXCEPTION-OBJECT "GET-EXCEPTION" USING message messageLength class classLength RETURNING result Parameter and return value • message (attribute: PIC X ANY LENGTH) Specifies the data item that ...

  • Fujitsu J Adapter Class Generator - page 52

    52 Chapter 5. Adapter Class Ref erence Data types The Java data types are mapped to the COBOL data types as shown below: Java data type COBOL data type boolean PIC 1 byte PIC X PIC X(2) • When an ANK character is stored, the first byte is used and the second byte is X'00'. • When a Japanese character is stored, two bytes are used. • ...

  • Fujitsu J Adapter Class Generator - page 53

    Chapter 5. Adapter Class Ref erence 53 Expansion format CLASS-ID. internal-class-name-1 AS " external-class-name " INHERITS internal- class-name-2 . ... FACTORY. ... <<Factory method corresponding to a constructor>> <<Property method corresponding to a class variable>> <<Factory method corresponding to a clas ...

  • Fujitsu J Adapter Class Generator - page 54

    54 Chapter 5. Adapter Class Ref erence Note: Fujitsu NetCOBOL does not distingu ish between uppercase and lowercase letters of a class name. Therefore, cl ass names whose external class names are different only in uppercase and lowercas e letters cannot be used concurrently. Supplement When the adapter class of java.lang.String is generated, the pu ...

  • Fujitsu J Adapter Class Generator - page 55

    Chapter 5. Adapter Class Ref erence 55 6. When an exception is declared for the constructor, the RAISING specification is generated. Generation example The factory method corresponding to construc tor Date() of the java.util.Date class is generated as shown below: METHOD-ID. CREATE-01 AS "Create-Date-01". [1] ... LINKAGE SECTION. 01 CREAT ...

  • Fujitsu J Adapter Class Generator - page 56

    56 Chapter 5. Adapter Class Ref erence Class variable Explanation A public class variable (static field) is ma pped to a COBOL property method (factory). Expansion format METHOD-ID. GET PROPERTY property-name. ... LINKAGE SECTION. 01 property-value data-description-entry. PROCEDURE DIVISION RETURNING property-value. ... END METHOD property-name. ME ...

  • Fujitsu J Adapter Class Generator - page 57

    Chapter 5. Adapter Class Ref erence 57 2. "out" is mapped to J-PRINTSTREAM (interna l class name of java-io-PrintStream) because its attribute is java.io.PrintStream. Supplement When a property name is generated from a field name, a number is assigned to secure the uniqueness of the name. The class browser can be used to check the corresp ...

  • Fujitsu J Adapter Class Generator - page 58

    58 Chapter 5. Adapter Class Ref erence Generation example The factory method corresponding to class method abs (long) of the java.lang.Math class is generated as shown below: METHOD-ID. JM-ABS-01 AS "abs-01". [1] ... LINKAGE SECTION. 01 RTN-VALUE PIC S9(18) COMP-5. 01 PARA-1 PIC S9(18) COMP-5. PROCEDURE DIVISION USING PARA-1 RETURNING RTN ...

  • Fujitsu J Adapter Class Generator - page 59

    Chapter 5. Adapter Class Ref erence 59 - If a same property name has already been assigned, the second and subsequent property names are each suffixed with a hyphen "-" followed by a two-digit number (01 to 99) to prevent name duplication. (See " Numbering names. ") - A name exceeding 30 characters is truncated after the 30th ch ...

  • Fujitsu J Adapter Class Generator - page 60

    60 Chapter 5. Adapter Class Ref erence Instance Method Explanation A non-public instance method (non-stati c method) is mapped to a COBOL object method. Expansion format METHOD-ID. internal-method-name AS "external-method-name" [OVERRIDE]. ... DATA DIVISION. LINKAGE SECTION. [parameter ...] [return-value ...] PROCEDURE DIVISION [USING par ...

  • Fujitsu J Adapter Class Generator - page 61

    Chapter 5. Adapter Class Ref erence 61 Generation example The object method corresponding to instance method getTime() of the java.util.Date class is generated as shown below: METHOD-ID. JM-GETTIME AS "getTime". [1] ... LINKAGE SECTION. 01 RTN-VALUE PIC S9(18) COMP-5. PROCEDURE DIVISION RETURNING RTN-VALUE. ... END METHOD JM-GETTIME. 1. S ...

  • Fujitsu J Adapter Class Generator - page 62

    62 Chapter 5. Adapter Class Ref erence Parameter and return value • class-name Specifies the internal class name of the java-lang-String class declared in the REPOSITORY paragraph. • initialValue (attribute: PIC X ANY LENGTH) Specifies an alphanumeric data item as the initial value of the String object. • createdObject (attribute: OBJECT REFE ...

  • Fujitsu J Adapter Class Generator - page 63

    Chapter 5. Adapter Class Ref erence 63 • createdObject (attribute: OBJECT REFERENCE SELF) Returns the generated object. Supplement When a data name is specified for initialValue , a String object as long as data item length is generated. However, inserting X”0000” in the statement can generate a String object shorter than data item length. .. ...

  • Fujitsu J Adapter Class Generator - page 64

    64 Chapter 5. Adapter Class Ref erence GET-STRING-N method (object method) Explanation This method fetches the character string fr om the String object as a national data item. Syntax INVOKE anObject "GET-STRING-N" RETURNING stringValue Parameter and return value • anObject Specifies the String object from which a character string is to ...

  • Fujitsu J Adapter Class Generator - page 65

    Chapter 5. Adapter Class Ref erence 65 GET-STRING-LENGTH-N method (object method) Explanation This method returns the length of the char acter string of the String object as the length (number of characters) of the national data item. Syntax INVOKE anObject "GET-STRING-LENGTH-N" RETURNING stringLength Parameter and return value • anObje ...

  • Fujitsu J Adapter Class Generator - page 66

    66 Chapter 5. Adapter Class Ref erence Expansion format CLASS-ID. internal-class-1 AS "external-class-name" INHERITS internal- class-name-2. ... FACTORY. ... <<NEW-ARRAY method>> END FACTORY. OBJECT. ... <<GET-ARRAY-LENGTH method>> <<GET-ARRAY-ELEMENT method>> <<SET-ARRAY-ELEMENT method>> EN ...

  • Fujitsu J Adapter Class Generator - page 67

    Chapter 5. Adapter Class Ref erence 67 CLASS-ID. JA-1-STRING AS "JA-1-java-lang-String" INHERITS J-OBJECT. ... END CLASS JA-1-STRING. Adapter classes of int [] [] [] are generated as shown below: CLASS-ID. JA-3-INT AS "JA-3-int" INHERITS J-OBJECT. [1] ... END CLASS JA-3-INT. CLASS-ID. JA-2-INT AS "JA-2-int" INHERITS J- ...

  • Fujitsu J Adapter Class Generator - page 68

    68 Chapter 5. Adapter Class Ref erence ... REPOSITORY. CLASS JA-2-INT AS "JA-2-int" CLASS JA-1-INT AS "JA-1-int" ... 01 anArray OBJECT REFERENCE JA-2-INT. 01 wArray OBJECT REFERENCE JA-1-INT. ... INVOKE JA-2-INT "NEW-ARRAY" USING n RETURNING anArray. [1] PERFORM VARYING I FROM 0 BY 1 UNTIL I >= n INVOKE JA-1-INT &qu ...

  • Fujitsu J Adapter Class Generator - page 69

    Chapter 5. Adapter Class Ref erence 69 SET-ARRAY-ELEMENT method (object method) Explanation This method sets an element of an array object. Syntax INVOKE anObject "SET-ARRAY-ELEMENT" USING inx elemValue Parameter and return value • anObject Specifies the array object in which an element is to be set. • inx (attribute: PIC S9(9) COMP-5 ...

  • Fujitsu J Adapter Class Generator - page 70

    70 Chapter 5. Adapter Class Ref erence Name that is always unique according to generation rules A class name is generated from a class na me or interface name qualified by a Java package name. Since the qualified name is unique, the COBOL name generated from it is always unique. The sa me applies to an array class name. Thus, no class names and arr ...

  • Fujitsu J Adapter Class Generator - page 71

    Chapter 5. Adapter Class Ref erence 71 the J adapter class generator. For instance, the java.io.ObjectInputStream class inherits the java.io.ObjectInput interfac e and java.io.InputStream class (see the figure below). Figure 5.2 Relationships among java.io.ObjectInput interface, java.io.InputStream class, and java.io.ObjectInputStream class For the ...

  • Fujitsu J Adapter Class Generator - page 72

    72 Chapter 5. Adapter Class Ref erence read() read read(byte[]) read-01 java.io.ObjectInput interface read(byte[], int, int) java-io-ObjectInput class read-02 read() read read(byte[]) read-01 java.io.InputStream class read(byte[], int, int) java-io-InputStream class read-02 read() read java.io.ObjectInputStrea m class read(byte[], int, int) java-io ...

  • Fujitsu J Adapter Class Generator - page 73

    Chapter 6. Messages This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages. ...

  • Fujitsu J Adapter Class Generator - page 74

    74 Chapter 6. Messa ges Java2cob Command Messages This section explains the messages output by the java2cob command, including the operator responses to the messages. Adapter class generation failed because of a memory space shortage. Terminate unnecessary applications and retry. A memory space shortage occurred. Terminate unnecessary applications, ...

  • Fujitsu J Adapter Class Generator - page 75

    Chapter 6. Messa ges 75 Error: An invalid class name "xxx" was specified. Specify a Java class name or interface name qualified by a package name. Specify a valid class name or interface name and retry. Error: A valid directory name was missing. The option was ignored to continue processing.<<Same as above>> Specify a valid di ...

  • Fujitsu J Adapter Class Generator - page 76

    76 Chapter 6. Messa ges Warning: The method name of constructor "xxx" exceeded 160 characters. The characters after the first 160 characters were deleted. Check whether deleting the characters after the first 160 characters results in an unusable name. Error: Class information was not found. Generation was interrupted. Check whether there ...

  • Fujitsu J Adapter Class Generator - page 77

    Chapter 6. Messa ges 77 Messages Output during Execution This section explains the messages output during execution of programs using adapter classes, including the oper ator responses to the messages. The message format is shown below: Class name information: Message text Class name information indicates the adapter class in which an error occurre ...

  • Fujitsu J Adapter Class Generator - page 78

    78 Chapter 6. Messa ges The current thread could not be connected to Java VM. Check whether the program properly invokes the JVM-ATTACH method. The current thread could not be disconnected from Java VM. Check whether the program properly invokes the JVM-DETACH method. The adapter class generated by the J adapter class generator contains a Java clas ...

  • Fujitsu J Adapter Class Generator - page 79

    Chapter 6. Messa ges 79 No Java field is found. Check whether the Java class/interface was changed after execution of the J adapter class generator. The Java class/interface was probably ch anged after generation of an adapter class. Check the Java class/interface. Java class initialization failed. Call the J adapter class generator supplier. The J ...

  • Fujitsu J Adapter Class Generator - page 80

    80 Chapter 6. Messa ges ...

  • Fujitsu J Adapter Class Generator - page 81

    Chapter 7. Samples Sample 1 – Using Classes Example 1: Example of using java.lang.System, java.io.PrintStream, and java.util.Date classes This section explains the “Sample Program - Example 1 ” provided with this product. Example 1 shows how the java.lang.System, java.io.PrintStream, and java.util.Date classes of Java are used from COBOL. Out ...

  • Fujitsu J Adapter Class Generator - page 82

    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 f ...

  • Fujitsu J Adapter Class Generator - page 83

    Chapter 7. Samples 83 Sample 2 – Specifying Method Example 2: Example of generating an adapter class by specifying constructor/method/field This program description explains “Sample Program - Example 2” provided with this product. Example 2 shows how to generate the adapter class specifying constructor/method/field. Outline The program conten ...

  • Fujitsu J Adapter Class Generator - page 84

    84 Chapter 7. Samples Generating adapter classes Generate adapter classes using the java2cob command. java2cob -r java.lang.System -gf out [1] -r java.io.PrintStream -gm "println(java.lang.Object)" [2] -r java.util.Date -gc "Date()" [3] Note: “” shows the continuance line. 1. Generate an adapter class of the java.l ang. ...

  • Fujitsu J Adapter Class Generator - page 85

    Appendix A. Message List This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages. ...

  • Fujitsu J Adapter Class Generator - page 86

    86 Appendix A. Message Li st Java2cob Command Messages This section explains the messages output by the java2cob command, including the operator responses to the messages. Adapter class generation failed because of a memory space shortage. Terminate unnecessary applications and retry. A memory space shortage occurred. Terminate unnecessary applicat ...

  • Fujitsu J Adapter Class Generator - page 87

    Appendix A. Message Li st 87 Messages Output during Generation This section explains the messages output during adapter class generation, including the operator responses to the messages. The message format is shown below: Message type: Message text The message types are shown below: Message type Level Meaning Error Severe No adapter class is gener ...

  • Fujitsu J Adapter Class Generator - page 88

    88 Appendix A. Message Li st Error: The suffix number exceeded 99. Generation was interrupted. Retry while specifying –r option, -gc opti on, -gm option, -gf option, -om option, constructor/method/field-specifying-option in “Class class-name/interface-name ” parameter, or “Option ReduceClass” parameter to decrease the number of classes, f ...

  • Fujitsu J Adapter Class Generator - page 89

    Appendix A. Message Li st 89 Warning: The property name of field "xxx" exceeded 30 characters. The characters after the first 30 characters were deleted. Check whether deleting the characters after the first 30 characters results in an unusable name. Warning: The name of method "xxx" exceeded 160 characters. The characters after ...

  • Fujitsu J Adapter Class Generator - page 90

    90 Appendix A. Message Li st Messages Output during Execution This section explains the messages output during execution of programs using adapter classes, including the oper ator responses to the messages. Messages given while execution is underway ar e output to the same target output as that of the DISPLAY statement that is specified by UPON SYS ...

  • Fujitsu J Adapter Class Generator - page 91

    Appendix A. Message Li st 91 The adapter class generated by the J adapter class generator contains a Java class name in invalid format. Contact the J adapter class generator supplier. The J adapter class generator failed. Co llect failure information and call your Fujitsu systems engineer. A same name is used for a parent and its child in the Java ...

  • Fujitsu J Adapter Class Generator - page 92

    92 Appendix A. Message Li st No Java method is found. Check whether the Java class/interface was changed after execution of the J adapter class generator. The Java class/interface was probably ch anged after generation of an adapter class. Check the Java class/interface. The character string could not be fetched from the String object. Call the J a ...

  • Fujitsu J Adapter Class Generator - page 93

    Appendix B. Exception Type List The exception types that can be acquired by the GET-CODE method of the FJ-JAVA- ERROR class are described in this chapter. 1 Meaning Java VM detected an error. Remove the error cause. Response The Java VM detected an execution-time e rror. Determine the error cause from the exception information returned by the GET-E ...

  • Fujitsu J Adapter Class Generator - page 94

    94 Appendix B. Excepti on Type List 5 Meaning No Java field is found. Check whether th e Java class/interface was changed after execution of the J adapter class generator. Response The Java class/interface was probably changed after generation of an adapter class. Check the Java class/interface. 6 Meaning The subscript of the array object is invali ...

  • Fujitsu J Adapter Class Generator - page 95

    Appendix B. Excepti on Type List 95 10 Meaning A required Java class/interface definition is not found. Check the environment variable (COBJNI_CLASSPATH). Response No Java class/interface is found on the search path. Check whether the value of the environment variable (COBJNI_CLASSPATH) is valid. 11 Meaning No Java interface/abstract class instance ...

  • Fujitsu J Adapter Class Generator - page 96

    96 Appendix B. Excepti on Type List 15 Meaning An internal logical error (inconsistency between the return value and object reference) occurred. Call the J adapter class generator supplier. Response The J adapter class generator failed. Collect failure information and call your Fujitsu systems engineer. 16 Meaning Java VM detected an error. Remove ...

  • Fujitsu J Adapter Class Generator - page 97

    Index adapter class, 14, 34, 46, 51 adapter object, 15 alphanumeric item, 27, 28, 34, 40 array, 65 assign, 25 -c, 32, 54, 63 class file, 18, 20 class method, 11, 26, 57 class variable, 11, 25, 26, 56 classpath, 35, 37 -classpath, 32 constructor, 32, 34, 37, 51, 54, 55, 57 , 70 constructors. See constructor cross-reference, 33, 39, 42 , 43, 58 -d, 3 ...

  • Fujitsu J Adapter Class Generator - page 98

    98 Index 98 -r, 20, 33, 34, 58 ReduceClass , 40 restrictions, 12 return value, 57 Runtime, 12 -s[n], 34 SET-ARRAY-ELEMENT, 69 source file, 19, 29, 42 String class, 26, 44, 54, 61 -t, 34 Termination, 22 Unicode, 35, 38 unique name, 69 ...

Manufacturer Fujitsu Category Portable Generator

Documents that we receive from a manufacturer of a Fujitsu J Adapter Class Generator can be divided into several groups. They are, among others:
- Fujitsu technical drawings
- J Adapter Class Generator manuals
- Fujitsu product data sheets
- information booklets
- or energy labels Fujitsu J Adapter Class Generator
All of them are important, but the most important information from the point of view of use of the device are in the user manual Fujitsu J Adapter Class Generator.

A group of documents referred to as user manuals is also divided into more specific types, such as: Installation manuals Fujitsu J Adapter Class Generator, service manual, brief instructions and user manuals Fujitsu J Adapter Class Generator. Depending on your needs, you should look for the document you need. In our website you can view the most popular manual of the product Fujitsu J Adapter Class Generator.

Similar manuals

A complete manual for the device Fujitsu J Adapter Class Generator, how should it look like?
A manual, also referred to as a user manual, or simply "instructions" is a technical document designed to assist in the use Fujitsu J Adapter Class Generator by users. Manuals are usually written by a technical writer, but in a language understandable to all users of Fujitsu J Adapter Class Generator.

A complete Fujitsu manual, should contain several basic components. Some of them are less important, such as: cover / title page or copyright page. However, the remaining part should provide us with information that is important from the point of view of the user.

1. Preface and tips on how to use the manual Fujitsu J Adapter Class Generator - At the beginning of each manual we should find clues about how to use the guidelines. It should include information about the location of the Contents of the Fujitsu J Adapter Class Generator, FAQ or common problems, i.e. places that are most often searched by users in each manual
2. Contents - index of all tips concerning the Fujitsu J Adapter Class Generator, that we can find in the current document
3. Tips how to use the basic functions of the device Fujitsu J Adapter Class Generator - which should help us in our first steps of using Fujitsu J Adapter Class Generator
4. Troubleshooting - systematic sequence of activities that will help us diagnose and subsequently solve the most important problems with Fujitsu J Adapter Class Generator
5. FAQ - Frequently Asked Questions
6. Contact detailsInformation about where to look for contact to the manufacturer/service of Fujitsu J Adapter Class Generator in a specific country, if it was not possible to solve the problem on our own.

Do you have a question concerning Fujitsu J Adapter Class Generator?

Use the form below

If you did not solve your problem by using a manual Fujitsu J Adapter Class Generator, ask a question using the form below. If a user had a similar problem with Fujitsu J Adapter Class Generator it is likely that he will want to share the way to solve it.

Copy the text from the picture

Comments (0)