springboot结合jdk6

1、下载jdk6

https://support.apple.com/kb/DL1572?locale=zh_CN

macos10.15已经存在jdk7、8版本,安装过程提示:已经安装过高版本。

2、打开“脚本编辑器”,输入代码

set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"}

do shell script "hdiutil mount " & quoted form of POSIX path of theDMG

do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp"

do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/"

do shell script "sed -i '' 's/return false/return true/g' ~/tmp/Distribution"

do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg"

do shell script "rm -rf ~/tmp"

display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"}

3、执行脚本,在弹出窗口中选择下载目录中JavaForOSX.dmg,在桌面会生成一个新的安装包java.pkg

4、双击打开pkg文件,完成程序安装,默认安装路径

/Library/Java/JavaVirtualMachines/1.6.0.jdk


5、idea新建maven工程,pom文件如下

SpringBoot

    Demo project for Spring Boot jdk1.6

   

        org.springframework.boot

        spring-boot-starter-parent

        1.3.5.RELEASE

       

   

   

        UTF-8

        UTF-8

        1.6

        1.6

        1.6

        7.0.79

   

   

       

            org.springframework.boot

            spring-boot-starter

       

       

            org.springframework.boot

            spring-boot-starter-web

       

   

   

       

           

               

                    org.springframework.boot

                    spring-boot-maven-plugin

               

           

       

        compile

   

6、启动报错,修改模块中maven配置

importing:  jdk1.7

runner:jre1.6

7、modules 

project setting:   SDK 1.6

platforms setting: SDK 1.6         

你可能感兴趣的:(springboot结合jdk6)