jTracer  1.03
Stack trace visualization tool
static File org.libcsdbg.jtracer.Registry.getPrefix ( ) throws IOException
static

Get the installation prefix.

Returns
the installation directory

Definition at line 369 of file Registry.java.

References org.libcsdbg.jtracer.Registry.getHomeDirectory(), and org.libcsdbg.jtracer.Registry.isLinux().

Referenced by org.libcsdbg.jtracer.Registry.getResource().

370  {
371  File retval = null;
372  if (isLinux())
373  retval = new File(getHomeDirectory(), ".jTracer");
374  else
375  retval = new File("C:\\Program Files\\jTracer");
376 
377  String path = retval.getCanonicalPath();
378 
379  String msg = null;
380  if (!retval.isDirectory())
381  msg = "The installation directory '" + path + "' doesn't exist";
382 
383  else if (!retval.canRead())
384  msg = "Can't access the installation directory '" + path + "'";
385 
386  if (msg != null)
387  throw new IOException(msg);
388 
389  return retval;
390  }
static boolean isLinux()
Definition: Registry.java:433
static File getHomeDirectory()
Get the user home directory.
Definition: Registry.java:345

+ Here is the call graph for this function:

+ Here is the caller graph for this function: