Just started using Inline::Java (v0.52) with Java v1.5.0_12.  Couldn't
find a solution anywhere and my company blocks of anything useful in
Google Groups.

I had no problem running the simple example given.  My problem starts
when I try to reference other classes.  Given a small example:

----Perl Code----
use Cwd;

use Inline Java => <<'END_OF_JAVA_CODE', CLASSPATH => getcwd;
    import my.java.app.here.MyOtherClass;

    class MyClass {
        public MyClass() {
            MyOtherClass myobj;
        }
    }
END_OF_JAVA_CODE

my ($obj) = MyClass->new();
----Perl Code----

MyOtherClass.java is at 'my/java/app/here/MyOtherClass.java' relative to
my current directory (hence the getcwd call to add to CLASSPATH).

This compiles fine.  When I run it, I get:

Can't locate object method "new" via package "MyClass" (perhaps you
forgot to load "MyClass"?) at ./example line 13.

If I comment out the 'MyOtherClass myobj;' line, it works fine.  The
only solution I found to this type of problem was when the person was
using Inline::Java within a Perl package (which I'm not doing).

I would appreciate any hints, tips, URLs, ways to debug the problem,
etc.
-- 
Adam Stein @ Xerox Corporation       Email: [EMAIL PROTECTED]
                                            
Disclaimer: All views expressed             
here have been proved to be my own.  [http://www.csh.rit.edu/~adam/]

Reply via email to