File tree Expand file tree Collapse file tree
src/main/java/io/github/project516/NumberGuessingGame Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,12 +39,17 @@ java {
3939 }
4040}
4141
42+ tasks. withType(JavaCompile ) {
43+ options. release. set(8 )
44+ }
45+
4246application {
4347 // Define the main class for the application.
4448 mainClass = ' io.github.project516.NumberGuessingGame.Main'
4549}
4650
4751compileJava. dependsOn spotlessApply
52+
4853spotless {
4954 java {
5055 googleJavaFormat(' 1.17.0' ). aosp()
Original file line number Diff line number Diff line change 33public class Main {
44 public static void main (String [] args ) {
55 SystemInfo SysInfo = new SystemInfo ();
6- System .out .println ("Java version: " + Runtime .version ());
6+ System .out .println ("Java version: " + SysInfo .version ());
77 System .out .println ("Vendor: " + SysInfo .vendor ());
88 System .out .println ("JDK name: " + SysInfo .name ());
99 }
Original file line number Diff line number Diff line change @@ -8,4 +8,8 @@ String vendor() {
88 String name () {
99 return System .getProperty ("java.vm.name" );
1010 }
11+
12+ String version () {
13+ return System .getProperty ("java.vm.version" );
14+ }
1115}
You can’t perform that action at this time.
0 commit comments