|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.util.Loader
Provides utilities associated with loading resources.
Field Summary | |
static String |
PROPERTIES_FILE
Name of the file in the user's home directory from which properties are loaded. |
Constructor Summary | |
Loader()
|
Method Summary | |
static File |
getPropertiesFile()
Returns the name of the file from which properties will be loaded by this class. |
static void |
loadLibrary(String libname)
Loads a native library given its name. |
static void |
loadProperties()
Ensures that the user's customised properties have been loaded; these are read once from the file returned by the getPropertiesFile() method and incorporated into
the System properties. |
static File |
starjavaDirectory()
Returns the location of the main Starlink java directory which contains the lib, bin, etc, source directories and others. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PROPERTIES_FILE
Constructor Detail |
public Loader()
Method Detail |
public static File starjavaDirectory()
If for some reason the directory cannot be located, null is returned.
public static void loadLibrary(String libname) throws SecurityException, UnsatisfiedLinkError
libname
- the name of the library (not including system-specifics
such as 'lib' or '.so')
SecurityException
- if a security manager exists and its
checkLink method doesn't allow loading of the
specified dynamic library
UnsatisfiedLinkError
- if the library does not existSystem.loadLibrary(java.lang.String)
public static File getPropertiesFile()
PROPERTIES_FILE
in the directory
given by the System property "user.home".public static void loadProperties()
getPropertiesFile()
method and incorporated into
the System properties.
Calling this method after the first time has no effect.
System.getProperties()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |