|
From: <php...@li...> - 2010-09-26 19:48:15
|
Hi,
i'm having issues getting my own java class working with php/java bridge. the bridge works perfect with the sample scripts and a script to get the date and display it, but as soon as i try using my own class, thats when the plot thickens....
heres my simple class:
public class testClass {
private String _testString;
public testClass() {
}
public void SetStringVal (String val) {
this._testString = val;
}
public String GetStringVal() {
return this._testString;
}
}
i compiled it, made it into a jar file, then added it to the web-inf/lib folder in the JavaBridge template and deployed it with Tomcat (even restarted tomcat)
(i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works beautifully....)
my PHP code:
<?php
require_once("java/Java.inc");
$mClass = new java("testClass");
$mClass->SetStringVal("From Java");
echo $mClass->GetStringVal() ." to PHP";
?>
I assume that i followed the steps correctly, but no luck....i just get a blank page....
any help would be appreciated...
|