deleting corrupt output.jar

This commit is contained in:
Krauß, Josefine 2024-07-05 11:51:33 +02:00
parent 271bbf4b4b
commit da53e5d6dc
3 changed files with 8 additions and 4 deletions

Binary file not shown.

View File

@ -9,7 +9,7 @@ import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.tree.ParseTree; import org.antlr.v4.runtime.tree.ParseTree;
import java.io.Console; import java.io.File;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
@ -22,11 +22,10 @@ public class Compiler {
if (args.length < 1) { if (args.length < 1) {
System.out.println("Usage: java -jar Compiler.jar <file_path> [--suppress-details]"); System.out.println("Usage: java -jar Compiler.jar <file_path> [--suppress-details]");
//return; return;
} }
//String filePath = args[0]; String filePath = args[0];
String filePath = "src/CharArgument.java";
boolean suppressDetails = false; boolean suppressDetails = false;
@ -110,6 +109,11 @@ public class Compiler {
System.out.println(e); System.out.println(e);
return; return;
} }
File outputJarFile = new File("output.jar");
if (outputJarFile.exists())
outputJarFile.delete();
System.out.println("Your input was compiled. You can find the output in your current working directory."); System.out.println("Your input was compiled. You can find the output in your current working directory.");
} }
} }