You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
| 2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
| 2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
| 2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
| 2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
| 2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
| 2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
| 2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
| 2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <php...@li...> - 2008-03-12 05:23:21
|
Antonio, Thanks for answering my post. My hosting provider would not upgrade PHP 4 to PHP 5 because according to them it may break their Control Panel software. I would not mind to use old version of JavaBridge, but I would appreciate if someone would help me to pick the right version of JavaBridge considering I have PHP 4.3.9, JRE 1.4.2, and RH Linux. I hope to hear soon from some one. Thanks Nimesh php...@li... wrote: > I am confused as what version of bridge I need to use. > OS :Linux > JRE: 1.4.2 > PHP 4.3.9 Nimesh: I would really recommend you to upgrade to PHP 5.2.5; as far as I know the JavaBridge no longer supports PHP 4. You would have to use a very old version of the Bridge. Antonio ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users --------------------------------- Now you can chat without downloading messenger. Click here to know how. |
|
From: <php...@li...> - 2008-03-11 18:17:33
|
> I am confused as what version of bridge I need to use. > OS :Linux > JRE: 1.4.2 > PHP 4.3.9 Nimesh: I would really recommend you to upgrade to PHP 5.2.5; as far as I know the JavaBridge no longer supports PHP 4. You would have to use a very old version of the Bridge. Antonio |
|
From: <php...@li...> - 2008-03-11 18:15:35
|
Using JavaBridge 5.2.0. I got the following warning: Strict Standards: Creating default object from empty value in lib\Java.inc on line 1943 Any suggestions? Thanks! Antonio |
|
From: <php...@li...> - 2008-03-11 17:34:28
|
I am confused as what version of bridge I need to use.
OS :Linux
JRE: 1.4.2
PHP 4.3.9
I want to use bridge to share java session in PHP. I want to share java objects in PHP. I have Apache httpd server that would serve static HTML and PHP files. I also have Tomcat running, Apache talks to Tomcat through JK Connector. PHP files are not served by tomcat.
Also point me to a decument that would help me to use bridge for above situation.
I look forward for help.
Thanks
Nimesh
---------------------------------
Chat on a cool, new interface. No download required. Click here.
|
|
From: <php...@li...> - 2008-03-11 11:42:22
|
Hi, Hmm, ok, I will have look at this. Thanks for the suggestion :) Rgds Tom -- # !! brOl_oUilLe --> |
|
From: <php...@li...> - 2008-03-11 11:27:11
|
Hi,
Java has certain mechanisms which allow one to discover objects. Since all object trees are at
least referenced by a thread (otherwise they'd be garbage collected), I'm sure you find a way how
to create / discover your object graphs.
Unfortunately this is outside of the scope of the PHP/Java Bridge, but you'll find more
information in a Java related forum.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|
|
From: <php...@li...> - 2008-03-11 10:29:58
|
Thanx for your suggestions! On Tue, Mar 11, 2008 at 3:35 PM, < php...@li...> wrote: > Hi, > > > Any pointers in this direction... > > I don't care. > > > This is a php.ini setting. But if you change PHP's default value, you'll > get the next exception > because your HTTP server times out the connection. And if you adjust your > HTTP server, your > browser might cut the connection. > > Instead of raising the default value, I would rather check why your script > doesn't terminate > within 30 seconds. > > > Regards, > Jost Boekemeier > > > > Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. > www.yahoo.de/go > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2008-03-11 10:29:18
|
Hi, I'm back with my problems :) Let's consider my launched application. There is the 'main' function which is 'static' and which creates other objects, from other classes, to be used. Of course these objects are not necessarily attributes of the main class, o/w they would be 'static' as well, wouldn't they? Is there a way to get access to these objects if they are instanciated in the main itself? rgds, Tom -- # !! brOl_oUilLe --> |
|
From: <php...@li...> - 2008-03-11 10:05:32
|
Hi,
> Any pointers in this direction...
I don't care.
This is a php.ini setting. But if you change PHP's default value, you'll get the next exception
because your HTTP server times out the connection. And if you adjust your HTTP server, your
browser might cut the connection.
Instead of raising the default value, I would rather check why your script doesn't terminate
within 30 seconds.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-11 02:54:15
|
Hi Jost, Any pointers in this direction... Pls let me know! Bharti On Sun, Mar 9, 2008 at 7:59 AM, Bharti Batra <bha...@gm...> wrote: > Hi Jost, > > I see the following error: > > *Fatal error*: Maximum execution time of 60 seconds exceeded in * > http://127.0.0.1:8080/slJavaBridge/java/Java.inc* on line *818 > > *For now, simulated this error by getting my backend Java Class not to > return and I get this error. I am a beginner in this web-programming domain. > If you can pls point me to the PHP settings for this too..it would be great! > * > > regds, > Bharti > * > > On Sat, Mar 8, 2008 at 7:01 PM, < > php...@li...> wrote: > > > Hi, > > > > > "maximum time of 60 seconds exceeded" from JavaBridge > > > > Are you sure? > > > > I think this error message comes from PHP, not from the JavaBridge. > > Please see the PHP > > documentation for details. > > > > > > Regards, > > Jost Boekemeier > > > > > > > > Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. > > www.yahoo.de/go > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > |
|
From: <php...@li...> - 2008-03-10 13:53:19
|
Hi,
Ah Thanks a lot :)
It finally works. My mistakes were :
require("http://localhost8091/JavaBridge/java/Java.inc");
The 'localhost' link is effectively important
launching the JavaBridge.jar
Which of course was already launched
By clearing my php script according to your advice, it now works perfectly
:)
>> I put the archive into my deployment directory 'ext'. This directory
contains:
>> - java/Java.inc
>> - hello.php
>> - JavaBridge.jar
>> - phpjava.jar
> I don't understand why this is necessary.
It was just to be sure that the correct scripts were called.
Thanks again and sorry for my low understanding :p
Tom
--
# !! brOl_oUilLe -->
|
|
From: <php...@li...> - 2008-03-10 13:20:12
|
Hi,
> public static void main(String[] args) {
> obj = new Integer(15);
> System.out.println(getObj());
> while(true);
> }
> public static int getObj() { return obj; }
> }
Okay. But you may want to use Thread.sleep() instead of the while(true); loop. :)
> I make a jar archive from it (phpjava.jar). The jar contains:
> Main-Class: app.Main
> Class-Path: JavaBridge.jar
Okay.
Next you can run a PHP script as follows:
<?php require("http://localhost8091/JavaBridge/java/Java.inc");
$myClass = new java("app.Main");
echo $myClass->getObj();
?>
> I put the archive into my deployment directory 'ext'. This directory
> contains:
> - java/Java.inc
> - hello.php
> - JavaBridge.jar
> - phpjava.jar
I don't understand why this is necessary.
> According to the manifest of JavaBridge.jar, I have also put in 'ext' (just
> in case):
> - php-script.jar
> - script-api.jar
No. These are the JSR223 bindings.
> Here is the php script:
> <?php
> require_once("java/Java.inc");
> java_require("phpjava.jar");
> $myClass = new java("app.Main");
> $obj = $myClass->getObj();
> echo $obj;
> ?>
No. The above script connects to the wrong application (if any). The java_require() is not
necessary either, your application already knows about app.Main.
> I launch the JavaBridge.jar by right-clicking on it and 'execute with
No. You have already started your application.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-10 12:42:34
|
Hi,
> With Runner.getRequiredInstance(). This allocates a Java continuation
which has full access to your Java objects.
> Please see the INSTALL.STANDALONE document for details.
Ok, so here is what i have done, following the instructions given by
INSTALL.STANDALONE and INSTALL.J2EE
I have my very simple java application:
package app;
public class Main {
public static final String JAVABRIDGE_PORT="8091";
static final php.java.bridge.JavaBridgeRunner runner =
php.java.bridge.JavaBridgeRunner.getRequiredInstance(JAVABRIDGE_PORT);
private static int obj;
public static void main(String[] args) {
obj = new Integer(15);
System.out.println(getObj());
while(true);
}
public static int getObj() { return obj; }
}
I make a jar archive from it (phpjava.jar). The jar contains:
app/Main.class
META-INF/MANIFEST.MF
The Manifest is:
Manifest-Version: 1.0
Main-Class: app.Main
Created-By: 1.5.0
Class-Path: JavaBridge.jar
I put the archive into my deployment directory 'ext'. This directory
contains:
- java/Java.inc
- hello.php
- JavaBridge.jar
- phpjava.jar
According to the manifest of JavaBridge.jar, I have also put in 'ext' (just
in case):
- php-script.jar
- script-api.jar
Here is the php script:
<?php
require_once("java/Java.inc");
java_require("phpjava.jar");
$myClass = new java("app.Main");
$obj = $myClass->getObj();
echo $obj;
?>
I launch the JavaBridge.jar by right-clicking on it and 'execute with
java...' and select the socket.
I execute in a shell: java -jar phpjava.jar
The value of 15 appears and then the application continues running because
of the while(true) loop.
I try to connect through http://localhost:8091/hello.php
The value of 0 appears.
The VMbridge.log warns me that the port is already being used.
Meaning that with php, it launches another instance of my Main.class
What am I missing ? For me, the "new java(app.Main);" line in the php script
is not the correct one if I want to get the already allocated objects.
Is 'runner' the variable I should use from php or is it a variable used by
the bridge ?
Which kind of methods can I call to access my allocated objects ?
> But why don't you simply call into the Java continuation and use the
objects already allocated by your Java application?
I would love to :)
Thanks for your help
Regards,
--
# !! brOl_oUilLe -->
|
|
From: <php...@li...> - 2008-03-09 16:29:15
|
Thanks Jost! I just solved the problem by specifying the absolute path of the file "tipper.fcl" in the fileName variable although the file is in the same directory. Now, everything works fine. Thanks again for all the help! Terry On Sun, Mar 9, 2008 at 4:28 AM, <php...@li...> wrote: > Hi, > > I am sorry, but I could not reproduce these problems. > > I have tested with IBM Java 1.5 on a Linux machine with the latest version of jFuzzyLogic. > Everything works as expected. > > If you have any problems with the PHP/Java Bridge or its documentation, please open a problem > report, please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233). > > > > Thanks again! I tried another approach and I guess I found the reason. > > The reason why the procedure returns a NULL object is that the file could not be found in Java's > current working directory (or class path). Since your NULL checks are completely wrong, they > return false results and pretend that the file exists. > > > > Right now I put everything inside a java class and it runs in java > > You don't need to write such a wrapper class. > > public String setRule(double x, double y){ > > echo "<p>" . $temp->setRule(3, 7) . "</p>"; > > > Can't load file: 'tipper.fcl' > > Correct. tipper.fcl is not in Java's working directory (or not accessible by the current class > loader). > > > > Exception occured; mixed trace: java.lang.Exception: Invoke failed: > > [[o:Test1]]->setRule((o:double)[o:PhpExactNumber], > > (o:double)[o:PhpExactNumber]). Cause: > > java.lang.IllegalArgumentException VM: 1.5.0@http://www.ibm.com/ > > Please take a look at what you have passed and what is expected. setRule expects two double > values, not two Integer values. > > In the end this may be a Java class loading issue. Since class loading is outside of the scope of > the PHP/Java Bridge, this is not a PHP/Java Bridge problem. (Use the bug tracker, if you think > this is a bug in the DynamicClassLoader. But I am quite certain that this will be closed, as > dynamic class loading is not really possible in Java -- I'd rather like to remove java_require() > instead.) > > > It is debatable if the bridge should automatically convert an object into a boolean > ($object==null) or to automatically convert an exact into an inexact number. But I think the > error messages are okay: A NullPointerException means that you have passed NULL, which in turn > means that some earlier call failed to produce a result. In this case the lookup for "tipper.tcl" > failed. -- If you look at the log file, you see a clear error message ("tipper.tcl not found") > from your library. > > The other problem is also obvious; if you pass an integer to a procedure expecting a double, > you'll get an IllegalArgumentException. > > If there's anything we could do to improve the bridge or its documentation, please let us know. > > > Regards, > Jost Boekemeier > > > > > > > > > > > Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: > http://de.yahoo.com/set > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2008-03-09 11:28:36
|
Hi, I am sorry, but I could not reproduce these problems. I have tested with IBM Java 1.5 on a Linux machine with the latest version of jFuzzyLogic. Everything works as expected. If you have any problems with the PHP/Java Bridge or its documentation, please open a problem report, please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233). > Thanks again! I tried another approach and I guess I found the reason. The reason why the procedure returns a NULL object is that the file could not be found in Java's current working directory (or class path). Since your NULL checks are completely wrong, they return false results and pretend that the file exists. > Right now I put everything inside a java class and it runs in java You don't need to write such a wrapper class. > public String setRule(double x, double y){ > echo "<p>" . $temp->setRule(3, 7) . "</p>"; > Can't load file: 'tipper.fcl' Correct. tipper.fcl is not in Java's working directory (or not accessible by the current class loader). > Exception occured; mixed trace: java.lang.Exception: Invoke failed: > [[o:Test1]]->setRule((o:double)[o:PhpExactNumber], > (o:double)[o:PhpExactNumber]). Cause: > java.lang.IllegalArgumentException VM: 1.5.0@http://www.ibm.com/ Please take a look at what you have passed and what is expected. setRule expects two double values, not two Integer values. In the end this may be a Java class loading issue. Since class loading is outside of the scope of the PHP/Java Bridge, this is not a PHP/Java Bridge problem. (Use the bug tracker, if you think this is a bug in the DynamicClassLoader. But I am quite certain that this will be closed, as dynamic class loading is not really possible in Java -- I'd rather like to remove java_require() instead.) It is debatable if the bridge should automatically convert an object into a boolean ($object==null) or to automatically convert an exact into an inexact number. But I think the error messages are okay: A NullPointerException means that you have passed NULL, which in turn means that some earlier call failed to produce a result. In this case the lookup for "tipper.tcl" failed. -- If you look at the log file, you see a clear error message ("tipper.tcl not found") from your library. The other problem is also obvious; if you pass an integer to a procedure expecting a double, you'll get an IllegalArgumentException. If there's anything we could do to improve the bridge or its documentation, please let us know. Regards, Jost Boekemeier Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set |
|
From: <php...@li...> - 2008-03-09 02:29:25
|
Hi Jost, I see the following error: *Fatal error*: Maximum execution time of 60 seconds exceeded in * http://127.0.0.1:8080/slJavaBridge/java/Java.inc* on line *818 *For now, simulated this error by getting my backend Java Class not to return and I get this error. I am a beginner in this web-programming domain. If you can pls point me to the PHP settings for this too..it would be great! * regds, Bharti * On Sat, Mar 8, 2008 at 7:01 PM, <php...@li...> wrote: > Hi, > > > "maximum time of 60 seconds exceeded" from JavaBridge > > Are you sure? > > I think this error message comes from PHP, not from the JavaBridge. Please > see the PHP > documentation for details. > > > Regards, > Jost Boekemeier > > > > Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. > www.yahoo.de/go > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2008-03-08 17:09:28
|
Hi,
>> $_SESSION['xy']="someValue";
>> $_SESSION['instance']=$repository;
>Depending on your PHP version it may or may not be possible to store Objects into the >session
>store.
I've solved this issue like this:
page 1:
$_SESSION['user'] = serialize($user);
page 2:
$user = unserialize($_SESSION['user']);
Regards,
Zoran
php...@li... wrote:
Hi,
> $repository=new Java("depths.moodle.RepositoryFactory");
> if (!isset($repository)){
The above isset(..) is wrong and obsolete. new ClassName() cannot return null.
Furthermore Java NULL values are represented by NULL proxies, not by PHP null or void.
> $_SESSION['xy']="someValue";
> $_SESSION['instance']=$repository;
Depending on your PHP version it may or may not be possible to store Objects into the session
store.
> protocol error: , Invalid document end at col 22. Check the back end log for details.
> Could you please indicate what did cause this error?
Sorry, but I can't read your back end log file. :)
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
|
|
From: <php...@li...> - 2008-03-08 17:05:46
|
Thanks again! I tried another approach and I guess I found the reason.
Right now I put everything inside a java class and it runs in java
with no problem. But once I try to run it in php, it fail to load the
file. Here's how it looks like.
Test1.java
import net.sourceforge.jFuzzyLogic.FIS;
import net.sourceforge.jFuzzyLogic.rule.FuzzyRuleSet;
public class Test1{
private FIS aFIS;
private FuzzyRuleSet aRuleSet;
public Test1(){}
public String init(){
String fileName = "tipper.fcl";
aFIS = FIS.load(fileName,true);
if( aFIS == null ){
return "Can't load file: '" + fileName + "'";
}
aRuleSet = aFIS.getFuzzyRuleSet();
if(aRuleSet == null){
return "Can't load rule set";
}
return "Initialization succeed";
}
public String setRule(double x, double y){
if(aRuleSet == null){
return "Can't access rule set";
}
else{
aRuleSet.setVariable("service", x);
aRuleSet.setVariable("food", y);
aRuleSet.evaluate();
return "" + aRuleSet.getVariable("tip").defuzzify();
}
}
public String printRuleSet(){
if(aRuleSet == null){
return "Can't print rule set";
}
else{
return aRuleSet.toString();
}
}
}
test1.php
<?php
if(!extension_loaded("java"))
require_once("JavaBridge/java/Java.inc");
java_require(".;jFuzzyLogic_1_2_1.jar;Test1.jar");
try{
$temp = new Java("Test1");
echo "<p>" . java_inspect($temp) . "</p>";
echo "<p>" . $temp->init() . "</p>";
echo "<p>" . $temp->setRule(3, 7) . "</p>";
echo "<p>" . $temp->printRuleSet() . "</p>";
} catch(JavaException $ex){
$exStr = java_cast($ex, "string");
echo "<p>Exception occured; mixed trace: " . $exStr . "</p>";
}
?>
and the output
[class Test1: Constructors: public Test1() Fields: Methods: public
boolean java.lang.Object.equals(java.lang.Object) public native int
java.lang.Object.hashCode() public java.lang.String
java.lang.Object.toString() public java.lang.String Test1.init()
public java.lang.String Test1.setRule(double,double) public
java.lang.String Test1.printRuleSet() public final native
java.lang.Class java.lang.Object.getClass() public final native void
java.lang.Object.notify() public final native void
java.lang.Object.notifyAll() public final void java.lang.Object.wait()
throws java.lang.InterruptedException public final void
java.lang.Object.wait(long) throws java.lang.InterruptedException
public final native void java.lang.Object.wait(long,int) throws
java.lang.InterruptedException Classes: ]
Can't load file: 'tipper.fcl'
Exception occured; mixed trace: java.lang.Exception: Invoke failed:
[[o:Test1]]->setRule((o:double)[o:PhpExactNumber],
(o:double)[o:PhpExactNumber]). Cause:
java.lang.IllegalArgumentException VM: 1.5.0@http://www.ibm.com/
All files are sitting in the same directory. Any idea? Thanks
On Sat, Mar 8, 2008 at 5:48 AM,
<php...@li...> wrote:
> > [[o:Request$PhpNull]]->toString.
>
> Instead of a NullPointerException we should throw a custom exception which explains that the user
> has passed a PHP null value to the bridge.
>
>
>
>
> Lesen Sie Ihre E-Mails auf dem Handy.
> www.yahoo.de/go
>
> -------------------------------------------------------------------------
>
>
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|
|
From: <php...@li...> - 2008-03-08 14:49:36
|
Hi,
> Can you please unsubscribe me from this list?
Sure. Can you please send me your name or e-mail account, so that we can remove you from the list?
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-08 13:52:51
|
Can you please unsubscribe me from this list? I tried twice from the control panel and never got the verification e-mail. Thank you |
|
From: <php...@li...> - 2008-03-08 13:48:16
|
> [[o:Request$PhpNull]]->toString.
Instead of a NullPointerException we should throw a custom exception which explains that the user
has passed a PHP null value to the bridge.
Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-08 13:35:49
|
Hi,
> $repository=new Java("depths.moodle.RepositoryFactory");
> if (!isset($repository)){
The above isset(..) is wrong and obsolete. new ClassName() cannot return null.
Furthermore Java NULL values are represented by NULL proxies, not by PHP null or void.
> $_SESSION['xy']="someValue";
> $_SESSION['instance']=$repository;
Depending on your PHP version it may or may not be possible to store Objects into the session
store.
> protocol error: , Invalid document end at col 22. Check the back end log for details.
> Could you please indicate what did cause this error?
Sorry, but I can't read your back end log file. :)
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-08 13:31:25
|
Hi,
> "maximum time of 60 seconds exceeded" from JavaBridge
Are you sure?
I think this error message comes from PHP, not from the JavaBridge. Please see the PHP
documentation for details.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-08 13:26:29
|
Hi,
> the entry point of the bridge. But how do I use it. It seems that I have to
With Runner.getRequiredInstance(). This allocates a Java continuation which has full access
to your Java objects.
Please see the INSTALL.STANDALONE document for details.
> I was actually thinking about using something like a stub on the php side,
> which would connect to another JVM where my Java object is already
> instanciated (something like RMI actually).
You could as well use RMI from within your Java continuation, please see the J2EE examples from
the source download folder.
But why don't you simply call into the Java continuation and use the objects already allocated by
your Java application?
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-08 13:17:58
|
> Thank you! Yes, I understand that.
No, I don't think so. :)
Please read the error message and your code carefully.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|