RE: [PHP] PHP & Java, calling a static method
| From: | Wendy | Date: | Thu, 08 May 2003 02:02:11 +0000 |
| Subject: | RE: [PHP] PHP & Java, calling a static method | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146774@lists.php.net to get a copy of this message | ||
On Wed, 2003-05-07 at 14:44, Chris McCluskey wrote:
> Ah ha!! Ok, I thought you would be re-writing everything in PHP. Which
> would work out perfectly. By what you have said I would guess that if
> you can't call it as
> $myObject = new Java( "Object.staticMethod()" );
> you might be SOL. And I'm guessing you've tried:
> $myObject = new Java( "Object" );
> $myObject->staticMethod();
> right? That would be my next best guess.
Nothing works. :( I do have a workaround, it just means exposing the
database a little more than I wanted to. I may rewrite the Java layer
to work better with PHP. But I don't think this is an unreasonable
request, it just sounds like something whoever wrote the Java extension
didn't have a need for. So where are they hiding so I can talk to them?
> Personally, I've kept my java work with my java work and my php work
> with my php work. If you have a lot of code already in java you might
> want to look into JSP/J2EE if you haven't already.
I'm a Java programmer first, Servlets/JSP/Struts, the whole nine yards
on the server side. There is a Java API to my database (IBM's UniData)
and I've written a data access layer in Java. Now I have a need to
access the database from a website that's all PHP. So... I can't write
the Java classes in PHP, and I can't drag the website over to Java.
The database also has a C API, and I'm now wondering if that might not
be a better way in rather than going through Java. Or is it six of one,
half dozen of the other?
Thanks again for your response!
--
Wendy Smoak
Chandler, AZ