diff options
Diffstat (limited to 'src/java/com/e1/pdj/JikesCompiler.java')
-rw-r--r-- | src/java/com/e1/pdj/JikesCompiler.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/java/com/e1/pdj/JikesCompiler.java b/src/java/com/e1/pdj/JikesCompiler.java new file mode 100644 index 0000000..f9337b2 --- /dev/null +++ b/src/java/com/e1/pdj/JikesCompiler.java @@ -0,0 +1,27 @@ +package com.e1.pdj; + +import java.io.*; +import com.cycling74.max.MaxSystem; + +public class JikesCompiler extends GenericCompiler { + + JikesCompiler() { + super("jikes"); + } + + void compileClass() throws PDJClassLoaderException { + if ( GenericCompiler.rtJar == null ) + throw new PDJClassLoaderException("pdj: JAVA_HOME not found"); + + String args = "jikes " + resolvJavaFile() + + " -classpath " + GenericCompiler.rtJar + getConfigurationClassPath() + + " -sourcepath " + PDJClassLoader.fclasses.toString(); + + int rc = exec(args); + + if ( rc != 0 ) { + throw new PDJClassLoaderException("pdj: compiler returned: "+ rc + ",args: " +args); + } + MaxSystem.post("pdj: compile successful"); + } +} |