Skip to content

Commit

Permalink
Merge pull request zouzg#157 from Jiang0Ke/master
Browse files Browse the repository at this point in the history
解决在java9下面无法运行的问题
  • Loading branch information
zouzg authored Apr 11, 2018
2 parents 27e27f9 + 60ff79e commit 4b41456
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/zzg/mybatis/generator/MainUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b41456

Please sign in to comment.