Hi,
I am having a problem outputting "Hello World" on to a CGI page by using Java in CGI/Perl. The code snippet is as follows:
#!/usr/bin/perl
# index.cgi
# Display a list of all existing processes
require './proc-lib.pl';
&header($text{'index_title
'}, "", "tree", !$no_module_config, 1);
print "<hr>\n";
&index_links("tree");
use Inline Java => <<'END';
import org.perl.inline.java.*;
class Test extends InlineJavaPerlCaller
{
public Test() throws InlineJavaException
}
public String helloWorld() throws InlineJavaException,Inline
JavaPerlEx
ception
{
return "Hello World";
}
}
END
my $pc = new Test();
print($pc->helloWorld() . "\n");
Could anyone tell me what I need to do to make this work?. The app is running on a Red Hat Linux machine.
Thanks!
Start Free Trial