Monique, 

By default Debian does not come come with a recent JVM, due
to the non-free-ness of Sun's license.

So first thing is to see if you have any Java installed at 
all...  When you type `java` at a shell it should give you 
an error about missing parameters... if you get the following:
              bash: java: command not found 
then you need to install a Java package for PHP4 to work with.

The most useful Java package for Debian, is blackdown.org's 
non-free port of Java, do the following to get it do the 
following: 

to /etc/apt/sources.list add:
# JDK -- mirrors @ http://www.blackdown.org/java-linux/mirrors.html
deb http://www.mirror.ac.uk/sites/ftp.blackdown.org/ja va-linux/debian
woody non-free

then run:
apt-get update; apt-get install j2sdk1.3 

Once you've installed Blackdown's port of Java, your java.home
var should be set (you may have to log-in again or reload your
profile to see it).

good luck,

-Garth

-----  "Monique Y. Herman" 
-----  19 Sep 2002 19:48:01 -0400

I'd like to play with using java classes from within php, as is
described in http://www.php.net/manual/en/ref.java.php ... I'm using the
apache and php4 packages from the debian testing distribution.

All of the documentation I've found on the web about installing the java
extension seems to be oriented toward windows, making me think that
maybe I don't need to specify an extension library on linux?

I tried simply using

        ini_set ("java.home", "/usr/local/sun-j2sdk1.4.1");
        $systemInfo = new Java("java.lang.System");

and got the following:

        Fatal error: Cannot instantiate non-existent class: java

That seems fairly straightforward: My php doesn't know java from adam.

So my questions are: Do I need to get an extension library for this
functionality on linux?  If not, does anyone know of a debian package of
php4 that will give me this capability?  I rather like being able to use
packages wherever possible.

Thanks in advance for any insight!

-- monique



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to