Calling methods in your own classes
When you use your own Java™ classes, the class that you specify in the EXTPROC and CLASS keywords is simply the name of the class. If the class is part of a package, you include the package information in the keywords. For example, consider the following two classes:
class Simple
{
static void method (void)
{
System.out.println ("Simple method");
}
}
package MyPkg;
class PkgClass
{
static void method (void)
{
System.out.println ("PkgClass method");
}
}
If the Simple class file is /home/myclasses/Simple.class, you would specify the directory /home/myclasses in your CLASSPATH environment variable, and you would specify 'Simple' as the class name in your RPG keywords.
If the PkgClass class file is /home/mypackages/MyPkg/PkgClass.class, you would specify the directory /home/mypackages (the directory containing the package) in your CLASSPATH environment variable, and you would specify 'MyPkg.PkgClass' (the package-qualified Java class) as the class name in your RPG keywords.
===> ADDENVVAR CLASSPATH '/home/myclasses:/home/mypackages:/home/myjarfiles/j1.jar'