Methods Summary |
---|
public static java.lang.String | getEtcDir()Returns the etc directory for Java DMK.
The default value of the etc directory is:
DefaultPaths.getInstallDir("etc") .
if (etcDir == null)
return getInstallDir("etc");
else
return etcDir;
|
public static java.lang.String | getEtcDir(java.lang.String dirname)Returns the etc directory for Java DMK concatenated with dirname.
The default value of the etc directory is:
DefaultPaths.getInstallDir("etc") .
if (etcDir == null) {
if (dirname == null) {
return getEtcDir();
} else {
return getEtcDir() + File.separator + dirname;
}
} else {
if (dirname == null) {
return etcDir;
} else {
return etcDir + File.separator + dirname;
}
}
|
public static java.lang.String | getInstallDir()Returns the installation directory for Java DMK.
The default value of the installation directory is:
<base_dir> + File.separator + SUNWjdmk + File.separator + jdmk5.0
if (installDir == null)
return useRessourceFile();
else
return installDir;
|
public static java.lang.String | getInstallDir(java.lang.String dirname)Returns the installation directory for Java DMK concatenated with dirname.
The default value of the installation directory is:
<base_dir> + File.separator + SUNWjdmk + File.separator + jdmk5.0
if (installDir == null) {
if (dirname == null) {
return getInstallDir();
} else {
return getInstallDir() + File.separator + dirname;
}
} else {
if (dirname == null) {
return installDir;
} else {
return installDir + File.separator + dirname;
}
}
|
public static java.lang.String | getTmpDir()Returns the tmp directory for the product.
The default value of the tmp directory is:
DefaultPaths.getInstallDir("tmp") .
if (tmpDir == null)
return getInstallDir("tmp");
else
return tmpDir;
|
public static java.lang.String | getTmpDir(java.lang.String dirname)Returns the tmp directory for Java DMK concatenated with dirname.
The default value of the tmp directory is:
DefaultPaths.getInstallDir("tmp") .
if (tmpDir == null) {
if (dirname == null) {
return getTmpDir();
} else {
return getTmpDir() + File.separator + dirname;
}
} else {
if (dirname == null) {
return tmpDir;
} else {
return tmpDir + File.separator + dirname;
}
}
|
public static void | setEtcDir(java.lang.String dirname)Sets the etc directory for Java DMK.
etcDir = dirname;
|
public static void | setInstallDir(java.lang.String dirname)Sets the installation directory for Java DMK.
installDir = dirname;
|
public static void | setTmpDir(java.lang.String dirname)Sets the tmp directory for the product
tmpDir = dirname;
|
private static java.lang.String | useRessourceFile()
InputStream in = null;
BufferedReader r = null;
try {
in =
DefaultPaths.class.getClassLoader().getResourceAsStream(INSTALL_PATH_RESOURCE_NAME);
if(in == null) return null;
r = new BufferedReader(new InputStreamReader(in));
installDir = r.readLine();
}catch(Exception e) {
}
finally {
try {
if(in != null) in.close();
if(r != null) r.close();
}catch(Exception e) {}
}
return installDir;
|