package MY::PACKAGE; # Add the Jar file path to the CLASSPATH environment variable BEGIN { $ENV{CLASSPATH} .= ":/drive1/myjavaclass.jar"; } # Called the Java class(es) that will be used by Perl # The DIRECTORY variable should have a location where contents can be write to use Inline ( Java => 'STUDY', STUDY => ['MyJavaClass'], AUTOSTUDY => 1, DIRECTORY => '/drive1/' ); # Used to make the PM file available in a CGI environment my $q = new CGI(); # Define the new method establishing a connection to the Java class constructor sub new { my $class = shift; my $obj = MY::PACKAGE::MyJavaClass->new(); return $obj; } 1;