js
Class Javac

java.lang.Object
  extended by pj.SubProcess
      extended by js.Javac

Deprecated. Replaced by JavacTask.

public class Javac
extends SubProcess

run the java compiler, create an archive.


Nested Class Summary
 
Nested classes/interfaces inherited from class pj.SubProcess
SubProcess.Copy
 
Field Summary
protected  String bootclasspath
          Deprecated. options to crosscompile (e.g., to 1.3 for MSIE on MacOS X).
protected  String envJar
          Deprecated. paths to environment source, environment archive, javac, jar, and rm.
protected  String envSource
          Deprecated. paths to environment source, environment archive, javac, jar, and rm.
protected  String extdirs
          Deprecated. options to crosscompile (e.g., to 1.3 for MSIE on MacOS X).
protected  String jar
          Deprecated. paths to environment source, environment archive, javac, jar, and rm.
protected  File java
          Deprecated. source file in pkgDir.
protected  String javac
          Deprecated. paths to environment source, environment archive, javac, jar, and rm.
protected  String packagePath
          Deprecated. package path, may be null.
protected  File pkgDir
          Deprecated. directory with class files, at or below tmpDir.
protected  String rm
          Deprecated. paths to environment source, environment archive, javac, jar, and rm.
protected  String sourceOption
          Deprecated. options to crosscompile (e.g., to 1.3 for MSIE on MacOS X).
protected  File tmpDir
          Deprecated. working directory for compiler.
 
Fields inherited from class pj.SubProcess
delete, source, sourceFile
 
Constructor Summary
Javac(String packagePath, String className, String envSource, String envJar, String javac, String jar, String rm, String sourceOption, String bootclasspath, String extdirs)
          Deprecated. construct paths and temporary directories.
Javac(String prefix, String packagePath, String className, String envSource, String envJar, String javac, String jar, String rm, String sourceOption, String bootclasspath, String extdirs)
          Deprecated. construct paths and temporary directories.
 
Method Summary
 String archive(Writer log)
          Deprecated. create the archive after a successful compilation, delete tmpDir.
 void clean()
          Deprecated. remove tmpDir.
 int compile(Writer log)
          Deprecated. compile the text written to SubProcess.source(), delete the (temporary) source file.
 
Methods inherited from class pj.SubProcess
execute, source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tmpDir

protected final File tmpDir
Deprecated. 
working directory for compiler.


pkgDir

protected final File pkgDir
Deprecated. 
directory with class files, at or below tmpDir.


java

protected final File java
Deprecated. 
source file in pkgDir.


packagePath

protected final String packagePath
Deprecated. 
package path, may be null.


envSource

protected final String envSource
Deprecated. 
paths to environment source, environment archive, javac, jar, and rm.


envJar

protected final String envJar
Deprecated. 
paths to environment source, environment archive, javac, jar, and rm.


javac

protected final String javac
Deprecated. 
paths to environment source, environment archive, javac, jar, and rm.


jar

protected final String jar
Deprecated. 
paths to environment source, environment archive, javac, jar, and rm.


rm

protected final String rm
Deprecated. 
paths to environment source, environment archive, javac, jar, and rm.


sourceOption

protected final String sourceOption
Deprecated. 
options to crosscompile (e.g., to 1.3 for MSIE on MacOS X).


bootclasspath

protected final String bootclasspath
Deprecated. 
options to crosscompile (e.g., to 1.3 for MSIE on MacOS X).


extdirs

protected final String extdirs
Deprecated. 
options to crosscompile (e.g., to 1.3 for MSIE on MacOS X).

Constructor Detail

Javac

public Javac(String packagePath,
             String className,
             String envSource,
             String envJar,
             String javac,
             String jar,
             String rm,
             String sourceOption,
             String bootclasspath,
             String extdirs)
      throws IOException
Deprecated. 
construct paths and temporary directories. Temporary file prefix is jcs.

Throws:
IOException

Javac

public Javac(String prefix,
             String packagePath,
             String className,
             String envSource,
             String envJar,
             String javac,
             String jar,
             String rm,
             String sourceOption,
             String bootclasspath,
             String extdirs)
      throws IOException
Deprecated. 
construct paths and temporary directories.

Parameters:
prefix - for SubProcess.source.
Throws:
IOException
Method Detail

compile

public int compile(Writer log)
            throws IOException,
                   InterruptedException
Deprecated. 
compile the text written to SubProcess.source(), delete the (temporary) source file. Delete tmpDir if compilation fails. Option -source 1.4 is set. The classpath contains envJar. envSource is prefixed by packagePath if any and compiled, too.

Returns:
exit code of compiler.
Throws:
IOException
InterruptedException

archive

public String archive(Writer log)
               throws IOException,
                      InterruptedException
Deprecated. 
create the archive after a successful compilation, delete tmpDir.

Returns:
null or basename of archive.
Throws:
IOException
InterruptedException

clean

public void clean()
Deprecated. 
remove tmpDir.