[Javaserver-perl] Re: Java.pm question
Brought to you by:
zzo
From: <ma...@zz...> - 2004-11-18 03:04:31
|
I assume your TestJava.java class has a public no-arg constructor? Also try using: % java -cp .:/path/to/TestJava.class/directory:/path/to/JavaServer.jar JavaServer maybe you spelled CLASSPATH wrong or it's not picking it up from your environment... Mark On Wed, Nov 17, 2004 at 06:56:53PM -0800, Tomas Jansson wrote: > Forgot to update the result I got when I tried it with your suggestiong. Got > the same message when setting my classpath to /my/dir/TestJava.class > > --Tomas > > -----Original Message----- > From: ma...@zz... [mailto:ma...@zz...] > Sent: Wednesday, November 17, 2004 6:14 PM > To: Tomas Jansson > Cc: jav...@li... > Subject: Re: Java.pm question > > > Hey Tomas, > Try setting your classpath to /my/dir/TestJava.class > I assume your TestJava object is not in a package itself. > Show me the exact command you're using to start JavaServer. > Also what exactly is happening when you try to create the TestJava > class - what Exception are you getting? > thanks, > Mark > > On Wed, Nov 17, 2004 at 05:40:49PM -0800, Tomas Jansson wrote: > > Hi Mark, > > I sitting here and trying to use your module but can't figure out how to > > create my own object. All the example that I can find (only those on cpan) > > include standard objects from java.lang. What I am trying to do is > basically > > this: > > > > Have a class called TestJava.class in /my/dir/ > > I also have a script, javatest.pl, in /my/dir > > In javatest.pl I want to create a TestJava object. I tried: > > my $java = new Java > > my $obj = $java->create_object("TestJava"); > > but it doesn't work. I have got it to work with standard classes. My > > classpath in the console where I try to run the perl script is > > "/path/to/JavaServer.jar:/my/dir" > > > > Thanks, > > Tomas |