com.codemercs.install
Class PlatformUninstaller

java.lang.Object
  extended by com.codemercs.install.PlatformUninstaller

 class PlatformUninstaller
extends java.lang.Object

Base class for platform-specific uninstallation classes.

Author:
Eberhard Fahle

Field Summary
protected  java.lang.String jarName
          The name of the jar that we want to remove
protected  java.io.File[] javaExtDirs
          An array of all the directories in the java.ext.dirs
protected  java.io.File[] javaLibDirs
          An array of all the directories in the java.library.path
protected  java.lang.String libFileName
          The is the plattform-specific name of the library
protected  java.lang.String libName
          The name of the library we want to remove
 
Constructor Summary
protected PlatformUninstaller(java.lang.String libName, java.lang.String jarName)
          Creates a new PlatformUninstaller.
 
Method Summary
 boolean deleteJar()
          Delete all the jar-files from the java.ext.dirs.
 boolean deleteLibrary()
          Delete all the library-files from the java.library.path.
 boolean jarExists()
          Tests wether the jar-file exists in the java.ext.dirs.
 boolean libraryExists()
          Tests wether the library exists in the java.library.path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

libName

protected final java.lang.String libName
The name of the library we want to remove


libFileName

protected final java.lang.String libFileName
The is the plattform-specific name of the library


jarName

protected java.lang.String jarName
The name of the jar that we want to remove


javaLibDirs

protected java.io.File[] javaLibDirs
An array of all the directories in the java.library.path


javaExtDirs

protected java.io.File[] javaExtDirs
An array of all the directories in the java.ext.dirs

Constructor Detail

PlatformUninstaller

protected PlatformUninstaller(java.lang.String libName,
                              java.lang.String jarName)
Creates a new PlatformUninstaller.

Parameters:
libName - the name of the library that is to be removed
jarName - the name of the jar-file that is to be removed
Method Detail

libraryExists

public boolean libraryExists()
Tests wether the library exists in the java.library.path.

Returns:
boolean True if the library exists at least in one of the java.library.path directories, false otherwise.

jarExists

public boolean jarExists()
Tests wether the jar-file exists in the java.ext.dirs.

Returns:
boolean True if the library at least in one of the java.library.path directories, false otherwise.

deleteLibrary

public boolean deleteLibrary()
Delete all the library-files from the java.library.path.

Returns:
boolean True if the library was deleted from all the java.library.path directories, false otherwise.

deleteJar

public boolean deleteJar()
Delete all the jar-files from the java.ext.dirs.

Returns:
boolean True if the jarfile was deleted from all the java.ext.dirs directories, false otherwise.