Skip to content

Commit 4f40040

Browse files
committed
Upgrade to JDK 21 and Language Level to 21
1 parent d3c9bfa commit 4f40040

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v3
14-
- name: Set up JDK 8
14+
- name: Set up JDK 21
1515
uses: actions/setup-java@v3
1616
with:
17-
java-version: '8'
17+
java-version: '21'
1818
distribution: 'temurin'
1919
cache: maven
2020
- name: Build with Maven - Install

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
</dependency>
5050
</dependencies>
5151
<properties>
52-
<maven.compiler.source>8</maven.compiler.source>
53-
<maven.compiler.target>8</maven.compiler.target>
52+
<maven.compiler.source>21</maven.compiler.source>
53+
<maven.compiler.target>21</maven.compiler.target>
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5555
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5656
</properties>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.redomar.game.log;
22

33
public enum PrintTypes {
4-
GAME, LEVEL, ENTITY, INPUT, MUSIC, NETWORK, SERVER, ERROR, TEST
4+
GAME, LEVEL, ENTITY, INPUT, MUSIC, NETWORK, SERVER, ERROR, TEST, SYSTEM
55
}

src/com/redomar/game/menu/Menu.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.redomar.game.audio.AudioHandler;
55
import com.redomar.game.event.Mouse;
66
import com.redomar.game.lib.Font;
7+
import com.redomar.game.log.PrintTypes;
78
import com.redomar.game.log.Printer;
89
import com.thehowtotutorial.splashscreen.JSplash;
910

@@ -36,6 +37,9 @@ public class Menu implements Runnable {
3637
private final Color UNSELECTED_COLOUR = new Color(0xFFCC5500);
3738

3839
public static void play() {
40+
Printer printer = new Printer();
41+
String property = System.getProperty("java.version");
42+
printer.print("RUNTIME JAVA VERSION " + property, PrintTypes.SYSTEM);
3943
try {
4044
// Splash screen
4145
AtomicReference<URL> splashImageResource = new AtomicReference<>(Game.class.getResource("/splash/splash.png"));
@@ -49,7 +53,6 @@ public static void play() {
4953
Game.setBackgroundMusic(new AudioHandler("/music/Towards The End.wav", true));
5054
Game.getBackgroundMusic().setVolume(VOLUME_IN_DB);
5155
} catch (Exception e) {
52-
Printer printer = new Printer();
5356
printer.exception(e.getMessage());
5457
}
5558
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
@@ -67,7 +70,7 @@ public static void play() {
6770
splash.splashOff();
6871
splash.removeAll();
6972
} catch (Exception e) {
70-
e.printStackTrace();
73+
printer.exception(e.getMessage());
7174
}
7275
}
7376

0 commit comments

Comments
 (0)