The error I am getting in using Inline::Java from web is.

[Fri May 31 02:00:33 2002] [error] [client 203.81.200.4] File does not exist: 
/home/zapmeta/public_html/500.shtml
[Fri May 31 02:00:33 2002] [error] PerlRun: `Can't locate object method "new" via 
package "Pod_alu" (perhaps you forgot to load "Pod_alu"?) at 
/home/zapmeta/public_html/cgi-bin/zapmeta/hh.pl line 32.

and the code  I am using is.

#!/usr/bin/perl

print "Content-type: text/html \n\n";



use Inline ( 
  Java => <<'END_OF_JAVA_CODE' ,
 
     class Pod_alu {
      public Pod_alu(){
      }

      public int add(int i, int j){
         return i + j ;
      }

      public int subtract(int i, int j){
         return i - j ;
      }
    }
END_OF_JAVA_CODE
 
 SHARED_JVM => 1,
 BIN => '/usr/java/j2sdk1.4.0/bin' ,

);

Inline::Java::release_JVM();
print "hello";

my $alu = new Pod_alu();
print($alu->add(9, 16) . "\n") ; # prints 25
print($alu->subtract(9, 16) . "\n") ; # prints -7

Any idea why this error is generating.

Reply via email to