From 8e20070a077e08e0233040bc81181509c221ff44 Mon Sep 17 00:00:00 2001 From: zhoudaxia <1018795633@qq.cin> Date: Fri, 26 Aug 2016 11:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=AE=9A=E8=A6=81=E6=94=B9=E6=AD=A3?= =?UTF-8?q?=E5=95=8A=E5=95=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/net/sf/robocode/installer/AutoExtract.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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"