|
From: <php...@li...> - 2010-04-04 08:43:31
|
Hi,
> PHP Fatal error: Uncaught [...]
I was asking for the result of this code:
try {
$prepago = new java("prepago");
} catch (Exception $e) {
echo $e;
}
Anyway, the error message contains enough information this time.
> [[o:Exception]:"java.lang.Exception: CreateInstance failed: new
prepago. Cause: java.lang.ClassNotFoundException: prepago VM:
1.6.0_18@http://java.sun.com/" [...]
Please see our FAQ entry "Why do I get a ClassNotFoundException?".
> The problem with the jar file is that I dont know how to open it,
You can open java archives with "winzip" on Windows. On Linux or Solaris
you can right-click on the jar and select "Open with ArchiveManager ..."
If you mean that you don't know how to use it, well, please see the API
documentation which you should have received with the library.
Assuming your class name is "foo.bar.baz.Prepago" and it contains a
public method called "something", you can call the method with:
$p = new java("foo.bar.baz.Prepago");
$p->something();
But I am sure you already know this, if you have read the PHP/Java Bridge API documentation.
Regards,
Jost Bökemeier
|