Examples of Main


Examples of sun.tools.jar.Main

    static String SERVICES = "META-INF/services";
    static String contents =
        System.getProperty("test.src") + File.separatorChar + "jarcontents";

    static void run(String ... args) {
        if (! new Main(System.out, System.err, "jar").run(args))
            throw new Error("jar failed: args=" + Arrays.toString(args));
    }
View Full Code Here

Examples of sun.tools.javac.Main

    public void setOut(OutputStream out) {
        this.out = out;
    }
   
    public boolean compile(String source) {
        Main compiler = new Main(out, "jsp->javac");

        String[] args = new String[]
        {
            "-encoding", encoding,
            "-classpath", classpath,
            "-d", outdir,
            source
        };

        return compiler.compile(args);
    }
View Full Code Here

Examples of sun.tools.javac.Main

                /************************************/
                category.debug("javac " + jFile );
                // Process proc = rt.exec( "javac " + jFile );
                // proc.waitFor();
                FileOutputStream  out      = new FileOutputStream( errFile );
                Main              compiler = new Main( out, "javac" );
                String            outdir   = f1.getParent();
                String[]          args     = null ;

                if (outdir == null) outdir=".";

                args = new String[] { "-d", outdir,
                          "-classpath",
                          getDefaultClasspath(msgContext),
                          jFile };

                boolean           result   = compiler.compile( args );

                /* Delete the temporary *.java file and check return code */
                /**********************************************************/
                (new File(jFile)).delete();

View Full Code Here

Examples of sun.tools.javac.Main

    public void setClassDebugInfo(boolean classDebugInfo) {
        this.classDebugInfo = classDebugInfo;
    }

    public boolean compile(String source) {
        Main compiler = new Main(out, "jsp->javac");
        String[] args;

        if (classDebugInfo) {
            args = new String[]
            {
                "-g",
                "-encoding", encoding,
                "-classpath", classpath,
                "-d", outdir,
                source
            };
  } else {
            args = new String[]
            {
                "-encoding", encoding,
                "-classpath", classpath,
                "-d", outdir,
                source
            };
        }

        return compiler.compile(args);
    }
View Full Code Here

Examples of sun.tools.native2ascii.Main

                    fos.write('a'); fos.write('b'); fos.write('c');
                } finally {
                    fos.close();
                }
                String[] n2aArgs = new String[] {"-encoding", "utf8", src, dst};
                if (!new Main().convert(n2aArgs)) {
                    fail("n2a failed.");
                }
                equal(permission(src), permission(dst));
                String[] a2nArgs = new String[] {"-reverse", "-encoding", "utf8", dst, src};
                if (!new Main().convert(a2nArgs)) {
                    fail("a2n failed.");
                }
                equal(permission(src), permission(dst));
            } finally {
                cleanup(src, dst);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.