mojira.dev
MC-18494

The Minecraft Server crashes if run from a directory containing a '!' in it's name

You cannot have '!'s in your user name / profile name, this breaks java horribly.

This is something we cannot control or fix

You can fix it by not having '!'s in your user name / profile name name.

(Quote from MCL-1133)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When minecraft_server.exe or minecraft_server.jar is put into a directory with a name containing the character '!', it crashes with a java.lang.NullPointerException straight away.

This is obviouslyt not intended, and it took me quite a while to understand why my server wouldn't run.

Steps to Reproduce:
1. Make a directory called '!' (or anything containing it)
2. Put minecraft_server.exe in it.
3. Run and watch it never open.

I've tested this on both jars and exes, snapshot 13w25b and 1.5.2.

Related issues

Comments

dirk (switched to Minetest)

Confirmed on Linux in directory β€œ/home/myusername/!” with snapshot 13w25b JAR server file.

$ java -jar minecraft_server.13w25b.jar 
java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at kx.<init>(SourceFile:15)
	at kx.<clinit>(SourceFile:9)
	at kq.g(SourceFile:37)
	at kn.g(SourceFile:15)
	at kw.<clinit>(SourceFile:27)
	at net.minecraft.server.MinecraftServer.main(SourceFile:508)
Exception in thread "main" java.lang.ExceptionInInitializerError
	at bs.<clinit>(SourceFile:4)
	at xv.v(SourceFile:495)
	at kw.a(SourceFile:139)
	at kw.c(SourceFile:85)
	at xv.<clinit>(SourceFile:310)
	at aqq.<clinit>(SourceFile:362)
	at kw.a(SourceFile:122)
	at kw.<clinit>(SourceFile:55)
	at net.minecraft.server.MinecraftServer.main(SourceFile:508)
Caused by: java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:97)
	at bt.a(SourceFile:68)
	at bt.a(SourceFile:103)
	at bt.<init>(SourceFile:22)
	at bt.<clinit>(SourceFile:11)
	... 9 more
Eliot Partridge

Confirmed on Windows 7, getting this error (same as Linux)

java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at ky.<init>(SourceFile:15)
at ky.<clinit>(SourceFile:9)
at kr.g(SourceFile:37)
at ko.g(SourceFile:15)
at kx.<clinit>(SourceFile:27)
at net.minecraft.server.MinecraftServer.main(SourceFile:508)
Exception in thread "main" java.lang.ExceptionInInitializerError
at bt.<clinit>(SourceFile:7)
at xx.v(SourceFile:495)
at kx.a(SourceFile:139)
at kx.c(SourceFile:85)
at xx.<clinit>(SourceFile:310)
at aqs.<clinit>(SourceFile:362)
at kx.a(SourceFile:122)
at kx.<clinit>(SourceFile:55)
at net.minecraft.server.MinecraftServer.main(SourceFile:508)
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at org.apache.commons.io.IOUtils.readLines(IOUtils.java:986)
at bu.<init>(SourceFile:26)
at bu.<clinit>(SourceFile:19)
... 9 more

Ezekiel

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

dirk (switched to Minetest)

I know it’s a template text, but yes, of course this is still an issue, no-one from the developers team actually cared about that issue so far.

$ java -jar minecraft_server.1.6.2.jar 
java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at la.<init>(SourceFile:15)
	at la.<clinit>(SourceFile:9)
	at kt.g(SourceFile:37)
	at kq.g(SourceFile:15)
	at kz.<clinit>(SourceFile:27)
	at net.minecraft.server.MinecraftServer.main(SourceFile:508)
Exception in thread "main" java.lang.ExceptionInInitializerError
	at bt.<clinit>(SourceFile:7)
	at yb.v(SourceFile:495)
	at kz.a(SourceFile:139)
	at kz.c(SourceFile:85)
	at yb.<clinit>(SourceFile:310)
	at aqw.<clinit>(SourceFile:362)
	at kz.a(SourceFile:122)
	at kz.<clinit>(SourceFile:55)
	at net.minecraft.server.MinecraftServer.main(SourceFile:508)
Caused by: java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
	at org.apache.commons.io.IOUtils.readLines(IOUtils.java:986)
	at bu.<init>(SourceFile:26)
	at bu.<clinit>(SourceFile:19)
	... 9 more

Jacob Wahlgren

(Unassigned)

Unconfirmed

server

Minecraft 1.5.2, Snapshot 13w25b

Retrieved