fix main() so that it handles args, also allows direct launch

This commit is contained in:
benfry
2012-07-29 15:02:27 +00:00
parent 362e6bf811
commit ef165716b8
6 changed files with 246 additions and 200 deletions

View File

@@ -263,6 +263,7 @@ public class JavaBuild {
File outputFolder = (packageName == null) ?
srcFolder : new File(srcFolder, packageName.replace('.', '/'));
outputFolder.mkdirs();
// Base.openFolder(outputFolder);
final File java = new File(outputFolder, sketch.getName() + ".java");
final PrintWriter stream = new PrintWriter(new FileWriter(java));
try {
@@ -276,7 +277,6 @@ public class JavaBuild {
throw new SketchException(msg);
} catch (antlr.RecognitionException re) {
// re also returns a column that we're not bothering with for now
// first assume that it's the main file
// int errorFile = 0;
int errorLine = re.getLine() - 1;