Thread

Posted on Thu Oct 20 04:31:18 2005 by sgallet
Can't locate object method
Hi,
I try to use Inline-Java and I've got a problem.
Here is the java code
use Inline ( Java => <<'END', import com.openexchange.server.Version; class MyVersion { public String getBuildnumber(){ return Version.BUILDNUMBER; } public String getMajor(){ return Version.MAJOR; } public String getMinor(){ return Version.MINOR; } } END CLASSPATH => '/usr/share/java/open-xchange-jdbc.jar:/usr/share/java/sun-mail.jar:/usr/share/j +ava/sun -activation.jar:/usr/lib/open-xchange/nas.jar:/usr/lib/open-xchange/comfiretools.jar:/usr/lib/open- +xchange /intranet.jar', DEBUG => 1, ) ;
And the perl one
sub ox_getVersion { my $obj = new MyVersion() ; return $obj->get_buildnumber() ; }
When I call the function I've got the following error : Can't locate object method "new" via package "MyVersion" (perhaps you forgot to load "MyVersion"?) at ...
Here is the content of the .jdat file
V2 class MyVersion java.lang.Object method instance MyVersion getBuildnumber() method instance MyVersion getMajor() method instance MyVersion getMinor() method instance java.lang.Object hashCode() method instance java.lang.Object getClass() method instance java.lang.Object wait(long) method instance java.lang.Object wait(long, int) method instance java.lang.Object wait() method instance java.lang.Object equals(java.lang.Object) method instance java.lang.Object notify() method instance java.lang.Object notifyAll() method instance java.lang.Object toString()
My system :
Debian Sarge, Sun JVM 1.5, Inline 0.44 and Inline::Java 0.50 TIA
Direct Responses: 1199 | Write a response
Posted on Thu Oct 20 16:09:08 2005 by sgallet in response to 1198
Re: Can't locate object method
Some news.
Everything works fine in a perl program.But fails when I put it in a module (.pm).
Another thing that I forgot : I'm a perfect newbie in perl;).
I'll appreciate any help (links, advices, ...)
TIA
Direct Responses: 4497 | Write a response
Posted on Wed Mar 7 07:50:12 2007 by kiranthakkar in response to 1199
Re: Can't locate object method
I am also newbie in perl and facing the same problem. Anybody having solved this problem? Any help would be appreciated. Kiran Thakkar
Write a response