Why has java_require() been deprecated?
Because Java doesn’t have a module system.
For example a library “lucene-2.3.1.jar” required by application B, cannot be loaded if an older version of the library, required by application A, is already cached.
An attempt to link the library anyway will cause “NoClassDefFound” or “NoSuchMethod” errors at runtime. Or some procedures may throw checked exceptions even though they haven’t declared them.
To protect PHP developers from Java’s “jar hell”, I have removed the dynamic class loading mechanism from PHP/Java Bridge version 6.0; java_require() issues a warning.
A proper Java module system must use special Java VM hooks, which don’t exist until now.
How do I load Java libraries?
You should link your Java application as described in the 07001 or 07002 documents.