### php.java.bridge

# Class DynamicJavaBridgeClassLoader

- `java.lang.Object`

- `java.lang.ClassLoader`

- `java.security.SecureClassLoader`

- `php.java.bridge.DynamicClassLoader`

- `php.java.bridge.DynamicJavaBridgeClassLoader`

`public class DynamicJavaBridgeClassLoader`
`extends DynamicClassLoader`

The bridge class loader which uses the DynamicClassLoader when possible.

Author:
  jostb

## Field Summary

### Fields inherited from class php.java.bridge.DynamicClassLoader

`defaultCacheTimeout`, `defaultLazy`

## Method Summary

`void`

`clear()`
  Clears all caches.

`static void`

`initClassLoader(java.lang.String phpConfigDir)`
  add all jars found in the phpConfigDir/lib and /usr/share/java to the list of our URLs.

`java.lang.Class`

`loadClass(java.lang.String name)`

`static DynamicJavaBridgeClassLoader`

`newInstance()`
  Create an instance of the dynamic java bridge classloader It may return null due to security restrictions on certain systems, so don't use this method directly but call: new JavaBridgeClassLoader(bridge, DynamicJavaBridgeClassLoader.newInstance()) instead.

`static DynamicJavaBridgeClassLoader`

`newInstance(java.lang.ClassLoader parent)`
  Create an instance of the dynamic java bridge classloader It may return null due to security restrictions on certain systems, so don't use this method directly but call: new JavaBridgeClassLoader(bridge, DynamicJavaBridgeClassLoader.newInstance()) instead.

`void`

`reset()`
  Reset to initial state.

`void`

`updateJarLibraryPath(java.lang.String rawPath, java.lang.String rawContextDir)`
  Set the library path for the bridge instance.

### Methods inherited from class php.java.bridge.DynamicClassLoader

`addURL`, `addURL`, `addURLs`, `addURLs`, `addURLs`, `addURLs`, `clear`, `clearCache`, `clearCaches`, `debugMsg`, `findResource`, `findResources`, `getStringFromURLArray`, `getURLArrayFromString`, `invalidate`, `invalidate`, `loadClass`, `setCacheTimeout`, `setLazy`, `setUrlClassLoaderFactory`

### Methods inherited from class java.lang.ClassLoader

`clearAssertionStatus`, `getParent`, `getResource`, `getResourceAsStream`, `getResources`, `getSystemClassLoader`, `getSystemResource`, `getSystemResourceAsStream`, `getSystemResources`, `loadClass`, `setClassAssertionStatus`, `setDefaultAssertionStatus`, `setPackageAssertionStatus`

### Methods inherited from class java.lang.Object

`equals`, `getClass`, `hashCode`, `notify`, `notifyAll`, `toString`, `wait`, `wait`, `wait`

## Method Details

### clear

    public void clear()

> Clears all caches.
> Overrides:
>   clear in interface DynamicClassLoader

### initClassLoader

    public static void initClassLoader(java.lang.String phpConfigDir)

> add all jars found in the phpConfigDir/lib and /usr/share/java to the list of our URLs. The user is expected to symbol .jar libraries explicitly with java_set_library_path, e.g. java_set_library_path("foo.jar;bar.jar"); For backward compatibility we add all URLs we encountered during startup before throwing a "ClassNotFoundException".

> Parameters:
>   `phpConfigDir` - The default php config directory

### loadClass

    public java.lang.Class loadClass(java.lang.String name)
                throws java.lang.ClassNotFoundException

> Overrides:
>   loadClass in interface DynamicClassLoader

### newInstance

    public static DynamicJavaBridgeClassLoader newInstance()

> Create an instance of the dynamic java bridge classloader It may return null due to security restrictions on certain systems, so don't use this method directly but call: new JavaBridgeClassLoader(bridge, DynamicJavaBridgeClassLoader.newInstance()) instead.

### newInstance

    public static DynamicJavaBridgeClassLoader newInstance(java.lang.ClassLoader parent)

> Create an instance of the dynamic java bridge classloader It may return null due to security restrictions on certain systems, so don't use this method directly but call: new JavaBridgeClassLoader(bridge, DynamicJavaBridgeClassLoader.newInstance()) instead.

### reset

    public void reset()

> Reset to initial state.

### updateJarLibraryPath

    public void updateJarLibraryPath(java.lang.String rawPath,
                                     java.lang.String rawContextDir)

> Set the library path for the bridge instance. Examples: setJarLibPath(";file:///tmp/test.jar;file:///tmp/my.jar");
> setJarLibPath("|file:c:/t.jar|http://.../a.jar|jar:file:///tmp/x.jar!/");
> The first char must be the token separator.

> Parameters:
>   `rawPath` - The path
>   `rawContextDir` - The context dir, e.g. /usr/lib/php/extensions