in reply to Accessing a Java singleton class from a Perl script using Inline::Java

I haven't tested this at all, but it seems to me that:
my $jc=main::com::schooner::test::JumpClass::getInstance();
Is wrong: it's not a method call. You should probably use:
my $jc=main::com::schooner::test::JumpClass->getInstance();

Note the -> arrow. That will ensure amongst other things that the "class" will be passed to the getInstance() method.

edit: you can also leave off the "main::" part of the package.

Replies are listed 'Best First'.
Re^2: Accessing a Java singleton class from a Perl script using Inline::Java
by blue_cowdawg (Monsignor) on Nov 06, 2005 at 02:44 UTC
        Note the -> arrow. That will ensure amongst other things that the "class" will be passed to the getInstance() method.

    Thanks Joost! You were on the money! That was the one thing I didn't think of last night!