diff --git a/代码/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java b/代码/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java index 9ebdb61..96b643c 100644 --- a/代码/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java +++ b/代码/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java @@ -9,7 +9,6 @@ package net.sf.robocode.installer; import javax.swing.*; - import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -34,12 +33,11 @@ public class AutoExtract implements ActionListener { private static File installDir; private static final String javaVersion = System.getProperty("java.version"); - private boolean acceptLicense() throws IOException { + private boolean acceptLicense() { String licenseText = ""; InputStream is; - - JarFile extractJar = null; + JarFile extractJar; try { extractJar = new JarFile("extract.jar"); @@ -47,8 +45,8 @@ public class AutoExtract implements ActionListener { } catch (IOException e) { return true; } finally{ - extractJar.close(); - } + extractJar.close(); + } if (is == null) { return true; } @@ -229,7 +227,7 @@ public class AutoExtract implements ActionListener { } } - public static void main(String argv[]) throws HeadlessException, IOException { + public static void main(String argv[]) { // Verify that the Java version is version 6 (1.6.0) or newer if (javaVersion.startsWith("1.") && javaVersion.charAt(2) < '5') { final String message = "Robocode requires Java 6 (1.6.0) or newer.\n"