From: <php...@li...> - 2006-09-10 23:26:22
|
Hi all, First off, my knowledge of Java is very limited (thus the need for the PHP/Java bridge). I have compiled and successfully installed the bridge for PHP 5.1.6 for Mac OS X and wanted to install the PEAR class that represents a sample java class I have called HelloData (which simply prints "Hello the date is: mm/dd/yyyy"). I used the following command as per the instructions: [PROMPT] sudo java -jar /usr/local/php5/lib/php/extensions/no-debug- non-zts-20050922/JavaBridge.jar --convert /usr/local/php5/lib/php HelloDate.jar This ran for about 4 minutes before completing. I was astonished that it would take so long. After it completed I looked in the PEAR directory (/urs/local/php5/lib/php) and found several new directories: drwxr-xr-x 5 root wheel 170 Sep 10 14:19 HelloDate drwxr-xr-x 416 root wheel 14144 Sep 10 14:19 charsets drwxr-xr-x 9200 root wheel 312800 Sep 10 14:19 classes drwxr-xr-x 46 root wheel 1564 Sep 10 14:19 jce drwxr-xr-x 82 root wheel 2788 Sep 10 14:19 jsse drwxr-xr-x 119 root wheel 4046 Sep 10 14:19 laf drwxr-xr-x 106 root wheel 3604 Sep 10 14:19 ui The first extra item makes sense, since it is the Java class I asked to be created in that command. But the rest are a mystery to me (isse? laf? ui?). And the "classes" directory is HUGE. It looks like it has thousands of items (are these classes too)? My questions are: 1) What are all those other directories for when I only asked for my sample class to be made into a PEAR class? Thanks for the assistance. |
From: <php...@li...> - 2006-09-11 16:39:05
|
Hi, first of all thank you very much for the feedback. > non-zts-20050922/JavaBridge.jar --convert > This ran for about 4 minutes before completing. It creates PHP proxies for the classes found in boot classpath and for the additional libraries specified on the command line. Depending on how many classes it has to convert and how fast your machine/VM is, this may take some time. On my devel. machine the command completes in less than two seconds. But even 4 minutes shouldn't be a problem because one usually calls this command once; during installation. > directory (/urs/local/php5/lib/php) and found > several new directories: > charsets > classes > jce > jsse > laf > ui These are created from the essential .jar files from the boot classpath. But rt is missing for some reason, doesn't the apple VM store the runtime into rt.jar? If not, we have a portability problem -- all other JVM implementations I've looked at (among them IBM, Sun, GNU) keep the base classes in rt.jar. > And the "classes" directory is > HUGE. That must be the rt then. This means that we have to add code which tries to detect the apple VM and rename the "classes" directory into the standard name "rt". Do you use a power or intel mac? > It looks > like it has thousands of items (are these classes > too)? Yes, the directory contains java_lang_String.php and the like. > My questions are: > 1) What are all those other directories for when I > only asked for my > sample class to be made into a PEAR class? They're created for convenience. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-09-11 18:33:06
|
On Sep 11, 2006, at 9:38 AM, php-java-bridge-=20 us...@li... wrote: > Hi, > > first of all thank you very much for the feedback. > >> non-zts-20050922/JavaBridge.jar --convert >> This ran for about 4 minutes before completing. > > It creates PHP proxies for the classes found in boot > classpath and for the additional libraries specified > on the command line. Depending on how many classes it > has to convert and how fast your machine/VM is, this > may take some time. On my devel. machine the command > completes in less than two seconds. But even 4 minutes > shouldn't be a problem because one usually calls this > command once; during installation. > Okay, that makes sense, although when I want to add a single class to =20= PEAR in the future, how do I avoid having it go through the whole =20 process again? >> directory (/urs/local/php5/lib/php) and found >> several new directories: > >> charsets >> classes >> jce >> jsse >> laf >> ui > > These are created from the essential .jar files from > the boot classpath. But rt is missing for some reason, > doesn't the apple VM store the runtime into rt.jar? > If not, we have a portability problem -- all other JVM > implementations I've looked at (among them IBM, Sun, > GNU) keep the base classes in rt.jar. > > I double checked and tthere is no RT directory like you mentioned. I =20= am not sure how this affect the overall installation? Are you saying =20= that the stubs created in my "classes" directory may not be visible =20 to the bridge software because of its name? >> And the "classes" directory is >> HUGE. > > That must be the rt then. This means that we have to > add code which tries to detect the apple VM and rename > the "classes" directory into the standard name "rt". > Do you use a power or intel mac? > I am currently running this on a dual G4 powerPC and will also be =20 installing this on a dual G5 Xserve server, once I understand how to =20 use the bridge properly. > >> It looks >> like it has thousands of items (are these classes >> too)? > > Yes, the directory contains java_lang_String.php and > the like. > > >> My questions are: >> 1) What are all those other directories for when I >> only asked for my >> sample class to be made into a PEAR class? > > They're created for convenience. > > > Regards, > Jost Boekemeier > > > > =09 > > =09 > =09 > ___________________________________________________________ > Der fr=FChe Vogel f=E4ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! = =20 > Mail: http://mail.yahoo.de > > ----------------------------------------------------------------------=20= > --- > Using Tomcat but need to do more? Need to support web services, =20 > security? > Get stuff done quickly with pre-integrated technology to make your =20 > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache =20 > Geronimo > http://sel.as-us.falkag.net/sel?=20 > cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2006-09-12 15:33:06
|
Hi, > when I want to add > a single class to > PEAR in the future, how do I avoid having it go > through the whole > process again? you could set the bootPath to an empty string in line 103, see http://php-java-bridge.cvs.sourceforge.net/php-java-bridge/php-java-bridge/server/php/java/bridge/Snarf.java?view=annotate&sortby=date In the future we should avoid creating stubs if the files already exist. > I double checked and there is no RT directory like > you mentioned. Thanks. I think the easiest way to fix this is to check if the created directory contains java_lang_System.php. If it does and the dir doesn't have the name "rt", rename it. I have created a ticket for this bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1557227&group_id=117793&atid=679233 > am not sure how this affect the overall > installation? The Lucene search and Itext PDF examples use something like: require_once("rt/java_lang_System.php"); require_once("rt/java_awt_Color.php"); When rt doesn't exist, those examples will not work. > to the bridge software because of its name? The require_once() in the above examples will fail. > > Do you use a power or intel mac? > I am currently running this on a dual G4 powerPC I thought so. There's a chance that the intel macs are more compatible with the Sun VM. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-12 15:58:05
|
On Sep 12, 2006, at 8:32 AM, php-java-bridge- us...@li... wrote: > Hi, > >> when I want to add >> a single class to >> PEAR in the future, how do I avoid having it go >> through the whole >> process again? > > you could set the bootPath to an empty string in line > 103, see > http://php-java-bridge.cvs.sourceforge.net/php-java-bridge/php-java- > bridge/server/php/java/bridge/Snarf.java?view=annotate&sortby=date > > In the future we should avoid creating stubs if the > files already exist. > That makes sense. > >> I double checked and there is no RT directory like >> you mentioned. > > Thanks. I think the easiest way to fix this is to > check if the created directory contains > java_lang_System.php. If it does and the dir doesn't > have the name "rt", rename it. I have created a ticket > for this bug: > http://sourceforge.net/tracker/index.php? > func=detail&aid=1557227&group_id=117793&atid=679233 > The file "java_lang_System.php" does indeed exist in my "classes" directory. So it looks like it is just a naming issue (at least with Power PC machines). I will have an Intel Mac laptop at the end of the month so can test the same install there to see if there is a difference. >> am not sure how this affect the overall >> installation? > > The Lucene search and Itext PDF examples use something > like: > > require_once("rt/java_lang_System.php"); > require_once("rt/java_awt_Color.php"); > Okay, so it is just an issue with where you do an include. I was concerned that the bridge software itself would look for the "rt" directory and run into problems if it could not find it. > When rt doesn't exist, those examples will not work. > >> to the bridge software because of its name? > > The require_once() in the above examples will fail. > >>> Do you use a power or intel mac? >> I am currently running this on a dual G4 powerPC > > I thought so. There's a chance that the intel macs are > more compatible with the Sun VM. > > Regards, > Jost Boekemeier > > > > > ___________________________________________________________ > Telefonate ohne weitere Kosten vom PC zum PC: http:// > messenger.yahoo.de > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |