Environment variable, Classpath, Notes – FUJITSU J Adapter Class Generator User Manual

Page 35: Example

Advertising
background image

Chapter 4. Using the Generator 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 ignored.
Notes:
• When specifying constructor/method/field, be sure to specify the -r option,

class-

name/interface-name

, -gc option, -gm option and -gf option successively. If

another option is specified among these options, specification error is generated.

• The Japanese cannot be included in class names or interface names.
• When Unicode is specified for the execution-time code, specify RCS(UCS2) in a

compiler option (see "

Building an adapter class

").

Example
Using the options is described in the following examples of the java2cob command.
• All of the adapter classes that are related to the java.io.PrintStream class and the

java.util.Date class are generated.

c:\> java2cob java.io.PrintStream java.util.Date

• The adapter class that is related to all println methods of the java.io.PrintStream

class and that is related to all constructors of the java.util.Date class are

generated.

c:\> java2cob -r java.io.PrintStream -gm println -r java.util.Date -gc

• Only the adapter classes that are related to the println(Object) of the

java.io.PrintStream class and to the Date() constructor of the java.util.Date class

are generated.

c:\> java2cob -r java.io.PrintStream -gm "println(java.lang.Object)" -r
java.util.Date -gc "Date()"

Advertising