Class JDKClass

java.lang.Object
  extended by JDKClass

public class JDKClass
extends java.lang.Object

Class to replace the functionality of the Sun JDK. Currently implements a replacement for javac, javadoc, and jar.


Constructor Summary
JDKClass()
          Default Constructor
JDKClass(java.lang.String homeDir)
          Default Constructor
 
Method Summary
 boolean compile(java.lang.String srcDir, java.lang.String binDir, java.lang.String classPath)
          This compiles java source into class files using the previously set home Directory.
 java.lang.String getHomeDir()
          Gets the current home directory.
 boolean jar(java.lang.String name, java.lang.String subDir)
          This produces a jar file in the home directory.
 boolean jar(java.lang.String name, java.lang.String subDir, java.lang.String mainClass)
          This produces a jar file in the home directory, complete with a manifest attribute of Main-Class:
 boolean jar(java.lang.String name, java.lang.String subDir1, java.lang.String mainClass, java.lang.String subDir2)
          This produces a jar file in the home directory, complete with a manifest attribute of Main-Class:
 boolean javaDoc(java.lang.String srcDir)
          This produces javadocs in the javadoc subdirectory of the home directory.
 void setHomeDir(java.lang.String homeDir)
          Sets the home directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDKClass

public JDKClass()
Default Constructor


JDKClass

public JDKClass(java.lang.String homeDir)
Default Constructor

Method Detail

getHomeDir

public java.lang.String getHomeDir()
Gets the current home directory.

Returns:
Home Directory

setHomeDir

public void setHomeDir(java.lang.String homeDir)
Sets the home directory.

Parameters:
homeDir - Home Directory

compile

public boolean compile(java.lang.String srcDir,
                       java.lang.String binDir,
                       java.lang.String classPath)
This compiles java source into class files using the previously set home Directory.

Parameters:
srcDir - The subdirectory of the home directory where the source files reside.
binDir - The subdirectory of the home directory where you want to put the class files.
classPath - The full classpath to look for the needed library files, deliminated by :.
Returns:
True if compilation was succesful, false otherwise.

javaDoc

public boolean javaDoc(java.lang.String srcDir)
This produces javadocs in the javadoc subdirectory of the home directory.

Parameters:
srcDir - The subdirectory of the home directory where the source files reside.
Returns:
True if javadoc'n was succesful, false otherwise.

jar

public boolean jar(java.lang.String name,
                   java.lang.String subDir)
This produces a jar file in the home directory.

Parameters:
name - Name of the jar file to create.
subDir - Subdirectory of home directory of whose content you want in the jar file.
Returns:
True if the jar was created succesfully, false otherwise.

jar

public boolean jar(java.lang.String name,
                   java.lang.String subDir,
                   java.lang.String mainClass)
This produces a jar file in the home directory, complete with a manifest attribute of Main-Class:

Parameters:
name - Name of the jar file to create.
subDir - Subdirectory of home directory of whose content you want in the jar file.
mainClass - Main Class to put in the manifest.
Returns:
True if the jar was created succesfully, false otherwise.

jar

public boolean jar(java.lang.String name,
                   java.lang.String subDir1,
                   java.lang.String mainClass,
                   java.lang.String subDir2)
This produces a jar file in the home directory, complete with a manifest attribute of Main-Class:

Parameters:
name - Name of the jar file to create.
subDir1 - The first subdirectory of home directory of whose content you want in the jar file.
subDir2 - The second subdirectory of home directory of whose content you want in the jar file.
mainClass - Main Class to put in the manifest.
Returns:
True if the jar was created succesfully, false otherwise.