Win32 Users & Using Command-line Interface
First of all, this is AWESOME!!!! I think PHP just took a huge leap forward with this capability!
Here is what you need:
In the Php.in file:
;Windows Extensions
extension=php_java.dll
[Java]
java.class.path = "C:\php\java\php_java.jar"
java.home = "C:\J2SDK_Forte\jdk1.4.0\jre"
java.library = "C:\J2SDK_Forte\jdk1.4.0\jre\bin\client\jvm.dll"
java.library.path = "C:\php\extensions"
* Don't forget the double-quotes in the values ! *
Next, add the file type association for Windows 2000.
1) open Windows Explorer
2) Click the Tool Menu Item
3) Select "Folder Options"
4) Select "File Types" tab
5) Select "New"
6) Type in your file extension for php scripts, I suggest ".phx" without the double-quotes
7) Click "Ok"
8) Find that extension in the "File Types" list again. You may have to back out and come back in to find it.
9) Once you found that newly added php extension, select the "Advanced" button. You can change the Icon here, but what you want to do is click the "New" button next to the "Actions" area.
10) For the "Action" value enter the value "open" without the quotes.
11) For the "Action used to perform this action:" value enter the value "C:\php\php-cli.exe -c C:\WINNT %1" without the quotes.
Lastly, add c:\php to you PATH Environment variable on your computer.
That should do it. You can test it by creating a test.phx file and open a cmd (DOS) window and cd into that directory(eg. c:\junk) and just execute your test file like this: c:\junk test.phx
This should return you your results as expected. If you don't know much about the php-cli.exe (cli = Command-Line Interface) go here http://www.php.net/manual/en/features.commandline.php.
I used the person's example at the top of this page and it worked.
Now, if I can just figure out how to call my own custom classes that have their own packages.