|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsynoptic.ui.PluginLookup
public class PluginLookup
This class contains utilities to get/set dynamically the class path and the native library path It is strongly dependent on Sun's JDK implementation. Patches to support other JVMs welcome :)
Field Summary | |
---|---|
static BasicMessageWriter |
messageWriter
Resources |
protected static java.lang.String |
separator
|
protected static java.lang.Class |
sysclass
|
protected static java.net.URLClassLoader |
sysloader
|
Constructor Summary | |
---|---|
PluginLookup()
|
Method Summary | |
---|---|
static void |
addClassPath(java.io.File f)
Adds the given file to the classpath. |
static void |
addClassPath(java.lang.String s)
Adds the given string to the classpath. |
static void |
addClassPath(java.net.URL url)
Adds the given URL to the classpath. |
static void |
addNativePath(java.io.File localPath)
Adds the given local path to the native library paths |
static void |
addPluginPaths()
This method tries to automatically add the plugin paths It looks for the main class is in the classpath Then it adds the content of the "plugins" sirectory sibling to the core one, if it exists I also adds all sub-directories found inside it as class directories, and all jars found in the subdirectories in the class path too. |
static boolean |
addPluginPaths(boolean userChoice,
java.awt.Window parentWindow)
This method tries to add the plugin paths It looks for the main class is in the classpath Then it adds the content of the "plugins" sirectory sibling to the core one, if it exists I also adds all sub-directories found inside it as class directories, and all jars found in the subdirectories in the class path too. |
static java.lang.String |
getClassPath()
|
static java.lang.String |
getNativePath()
|
static boolean |
isNativeLibrary(java.io.File f)
Helper function to determine if a given file is a dynamic native library |
static java.util.Vector |
lookup()
|
static void |
main(java.lang.String[] args)
|
static java.util.Vector |
search(java.lang.Class theClass)
Public method to search for all implementors of a given class object, in the classpath |
static java.util.Vector |
search(java.lang.Class theClass,
java.lang.String dirOrJar,
java.util.Vector entries)
|
static java.util.Vector |
search(java.lang.String dirOrJar,
java.util.Vector entries)
|
protected static void |
searchFile(java.lang.Class theClass,
java.io.File d,
java.util.Vector results,
java.lang.String prefix)
|
protected static void |
searchJar(java.lang.Class theClass,
java.util.jar.JarFile j,
java.util.Vector results)
|
protected static void |
testElement(java.lang.Class theClass,
java.lang.String name,
java.util.Vector results)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static BasicMessageWriter messageWriter
protected static java.lang.String separator
protected static java.net.URLClassLoader sysloader
protected static java.lang.Class sysclass
Constructor Detail |
---|
public PluginLookup()
Method Detail |
---|
protected static void testElement(java.lang.Class theClass, java.lang.String name, java.util.Vector results)
protected static void searchJar(java.lang.Class theClass, java.util.jar.JarFile j, java.util.Vector results) throws java.io.IOException
java.io.IOException
protected static void searchFile(java.lang.Class theClass, java.io.File d, java.util.Vector results, java.lang.String prefix)
public static java.util.Vector search(java.lang.Class theClass)
public static java.util.Vector search(java.lang.String dirOrJar, java.util.Vector entries)
public static java.util.Vector search(java.lang.Class theClass, java.lang.String dirOrJar, java.util.Vector entries)
public static java.util.Vector lookup()
public static void addClassPath(java.lang.String s)
public static void addClassPath(java.io.File f)
public static void addClassPath(java.net.URL url)
public static void addNativePath(java.io.File localPath)
public static boolean isNativeLibrary(java.io.File f)
public static void addPluginPaths()
public static boolean addPluginPaths(boolean userChoice, java.awt.Window parentWindow)
userChoice
- if true then the user can confirm the selected pathsparentWindow
- the owner for the dialog box displayed in interactive mode
public static java.lang.String getClassPath()
public static java.lang.String getNativePath()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |