From 60ff79efb61ee8e1bb2c89e343b97a2412562768 Mon Sep 17 00:00:00 2001 From: Bazz Jiang Date: Thu, 22 Feb 2018 10:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9C=A8java9=E4=B8=8B?= =?UTF-8?q?=E9=9D=A2=E6=97=A0=E6=B3=95=E8=BF=90=E8=A1=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zzg/mybatis/generator/MainUI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zzg/mybatis/generator/MainUI.java b/src/main/java/com/zzg/mybatis/generator/MainUI.java index cdef8251..3bd63565 100644 --- a/src/main/java/com/zzg/mybatis/generator/MainUI.java +++ b/src/main/java/com/zzg/mybatis/generator/MainUI.java @@ -37,14 +37,14 @@ public void start(Stage primaryStage) throws Exception { public static void main(String[] args) { String version = System.getProperty("java.version"); - if (Integer.parseInt(version.substring(2, 3)) >= 8 && Integer.parseInt(version.substring(6)) >= 60) { + if (Integer.parseInt(version.substring(0,1)) == 1 && Integer.parseInt(version.substring(2, 3)) >= 8 && Integer.parseInt(version.substring(6)) >= 60 || Integer.parseInt(version.substring(0,1))>=9) { launch(args); - } else { + }else { JFrame jFrame = new JFrame("版本错误"); jFrame.setSize(500, 100); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel jPanel = new JPanel(); - JLabel jLabel = new JLabel("JDK的版本不能低于1.8.0.60,请升级至最近的JDK 1.8再运行此软件"); + JLabel jLabel = new JLabel("JDK的版本不能低于1.8.0.60,请升级至最近的JDK 1.8再运行此软件,当前版本:" + version); jPanel.add(jLabel); jFrame.add(jPanel); jFrame.setLocationRelativeTo(null);