Target different version of JRE

前端 未结 3 1967
春和景丽
春和景丽 2020-12-11 16:21

I\'m testing Java on a Windows Surface Pro. The Surface Pro has Java 7 Update 55, but does not have the JDK installed.

I compiled a program on my MacBook fr

3条回答
  •  自闭症患者
    2020-12-11 16:31

    From the command line, change your call to:

    javac -source 1.7 -target 1.7 HttpsTest.java SSLSocketFactoryEx.java
    

    The documentation for javac (for JDK 8) is here.

    The documentation for javac (for JDK 9) is here.

    Note: In JDK 9, -target is replaced with --release.

提交回复
热议问题