oppcompilerfactory.java

来自「Java的面向对象数据库系统的源代码」· Java 代码 · 共 39 行

JAVA
39
字号
// You can redistribute this software and/or modify it under the terms of// the Ozone Library License version 1 published by ozone-db.org.////// $Id: OPPCompilerFactory.java,v 1.2.2.1 2004/01/11 20:42:34 per_nyfelt Exp $package org.ozoneDB.tools.OPP;import org.ozoneDB.tools.OPP.compiler.JavaCompiler;import org.ozoneDB.tools.OPP.compiler.AbstractJavaCompiler;import org.ozoneDB.tools.OPP.compiler.InternalJavaCompiler;import org.ozoneDB.tools.OPP.compiler.ExternalJavaCompiler;import java.io.File;public class OPPCompilerFactory {    public static JavaCompiler getCompilerInstance(File sourceDir, File outputDir) {        //System.out.println("sourceDir=" + sourceDir.getAbsolutePath() + " outputDir=" + outputDir.getAbsolutePath());        AbstractJavaCompiler compiler;        String jvmClassPath = System.getProperty("java.class.path", "");        String compilerCommand = System.getProperty("ozone.javac", "");        if (compilerCommand.equals("")) {            compiler = new InternalJavaCompiler();        } else {            compiler = new ExternalJavaCompiler(compilerCommand);        }        compiler.setDebug(true);        compiler.setDeprecation(true);        compiler.setOptimize(false);        compiler.setClasspath(jvmClassPath);        compiler.setSourcePath(sourceDir);        compiler.setOutputPath(outputDir);        //System.out.println("Compiler classpath: " + jvmClassPath);        return compiler;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?