12
12
import com .eclipsesource .json .Json ;
13
13
import com .eclipsesource .json .JsonObject ;
14
14
15
- import java .io .File ;
16
15
import java .io .IOException ;
17
16
import java .io .InputStreamReader ;
18
17
import java .lang .reflect .Method ;
19
- import java .nio .charset .StandardCharsets ;
20
- import java .nio .file .Files ;
21
- import java .nio .file .Paths ;
22
18
23
19
public final class Main {
24
20
@@ -30,7 +26,7 @@ private static JsonObject readJsonFile() {
30
26
InputStreamReader reader = null ;
31
27
32
28
try {
33
- reader = new InputStreamReader (Main .class .getClassLoader ().getResourceAsStream ("version.json" ), StandardCharsets . UTF_8 );
29
+ reader = new InputStreamReader (Main .class .getClassLoader ().getResourceAsStream ("version.json" ), " UTF_8" );
34
30
object = Json .parse (reader ).asObject ();
35
31
} catch (final IOException exc ) {
36
32
throw new RuntimeException ("Failed to read version.json" , exc );
@@ -52,7 +48,7 @@ public static void main(final String[] args) {
52
48
final String minecraftVersion = VERSION .getString ("name" , "Unknown" );
53
49
if (getJavaVersion () < javaVersion ) {
54
50
System .err .printf ("Minecraft %s requires running the server with Java %s or above. " +
55
- "Download Java %s (or above) from https://adoptium.net/%n " , minecraftVersion , javaVersion , javaVersion );
51
+ "Download Java %s (or above) from https://adoptium.net/" , minecraftVersion , javaVersion , javaVersion );
56
52
System .exit (1 );
57
53
}
58
54
0 commit comments