package minijava object Main { def main(args: Array[String]) { val compUnit = new Compiler() var parsedTree: Option[parser.Trees.Tree] = None if (args.length != 1 && args.length != 3) { compUnit.fatalError("usage: minijavac <File.java> [-d outputdir]") } if(args.length == 1) { compUnit.compile(args(0), "./") } else { if(!"-d".equals(args(1))) { compUnit.fatalError("Unrecognized option: " + args(1)) } compUnit.compile(args(0), args(2)) } } }