JP.ac.tsukuba.openjava
Class SunJavaCompiler
java.lang.Object
|
+--JP.ac.tsukuba.openjava.SunJavaCompiler
- All Implemented Interfaces:
- JavaCompiler
- public class SunJavaCompiler
- extends Object
- implements JavaCompiler
The class SunJavaCompiler
is an adapter for Sun's javac.
Message-Id: 19990930154627G.shiro@squareusa.com
I tried OpenJava1.0a1 on my IRIX box w/ SGI's JDK1.2
and had a problem to run ojc. Somehow, Runtime.exec()
didn't pass all the environment variables to the invoked
process (more specifically, it only passed TZ).
Consequently the CLASSPATH env was not passed to javac kicked
by JP.ac.tsukuba.openjava.SunJavaCompiler.complie(), which
prevented ojc from finishing compilation.
So far I couldn't find exact specification about how the
environment variables should be treated in Java specification
and API documents. I guess it may depend on platforms.
We avoided the problem by explicitly passing CLASSPATH to
the subprocess my modifying SunJavaCompiler class, but wondering
if there'd be a better way to handle it...
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
args
JavaCompilerArgs args
compilerMutex
private static Object compilerMutex
SunJavaCompiler
public SunJavaCompiler()
main
public static void main(String[] args)
compile
public void compile()
- Specified by:
compile
in interface JavaCompiler
getArgs
public JavaCompilerArgs getArgs()
- Specified by:
getArgs
in interface JavaCompiler
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interface JavaCompiler
compileExternal
private void compileExternal(String[] args)
compile
protected void compile(String[] args)
toString
private static String toString(String[] strs)