List of usage examples for org.eclipse.jdt.internal.compiler.batch Main tokenize
public static String[] tokenize(String commandLine)
From source file:io.joynr.generator.util.OnTheFlyJavaCompiler.java
License:Apache License
protected boolean compile(String arguments) { // return BatchCompiler.compile(sb.toString(), new PrintWriter(new // OutputStreamWriter(System.out)), new PrintWriter( // new OutputStreamWriter(errorStream)), null); return getMain().compile(Main.tokenize(arguments)); }
From source file:org.jnario.jnario.test.util.FeatureJavaCompiler.java
License:Open Source License
public void compile(List<String> files) { StringBuilder sb = new StringBuilder(getComplianceLevelArg()); sb.append(" "); sb.append(getClasspathArgs());//from www . ja v a 2 s . c o m sb.append(" "); sb.append(Joiner.on(" ").join(files)); OutputStream errorStream = new ByteArrayOutputStream(); if (!Main.compile(Main.tokenize(sb.toString()), new PrintWriter(System.out), new PrintWriter(errorStream), new Progress())) { throw new IllegalArgumentException("Couldn't compile : " + errorStream.toString() + "\n"); } }