Re: PHP and Java
| From: | Ernani Joppert Pontes Martins | Date: | Wed, 18 Sep 2002 05:18:11 +0000 |
| Subject: | Re: PHP and Java | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15869@lists.php.net to get a copy of this message | ||
This problem seems to be weird
First of all, this php script works on any other enviroment outside of your
computer?
Have you tried to set java configurations at php.ini file?
HTH,
Ernani
"James Opere" <J.OPERE@CGIAR.ORG> escreveu na mensagem
news:FC788AB9771FD6118E6F0002A5AD7B8F5CD02B@icrafnttrain.icraf.cgiar.org...
> I have downloaded JDK1.1.8 and installed on a windows platform.The
problem
> is that when i copy a script, paste and try to run as a .php which has
some
> java in it, i get an error i.e
>
> Fatal error: Cannot instantiate non-existent class: java in
> c:\phpdev\www\phpjava.php on line 5
> The script is as below:
> <?php
>
> // Create an instance of the System object
> // using PHP's Java class
> $system = new Java("java.lang.System");
>
> // Get the Java version
> $version = $system->getProperty("java.version");
>
> // Write it to the screen
> echo("Java Version: $version");
>
> ?>
>
> Can anybody help me out there how i should do my configuration so that
this
> can run? I tried making changes in php.ini but i still get the same
error.Do
> i need to install anothere java? If not, how then should i go about it?