- edited description
NPE Error executing script! in gamesever load, after java10 support update
1) Just clone last git from 2018-09-16 with java10 support update
2) Use gradlew.bat to build server
3) Fill mysql db and change setting in Server.properties and LoginServer.properties for mysql
4) run startLoginServer.bat - success
5) run startGameServer.bat - Error executing script! in [ Effects ] block
[23/09 20:05:10] -------------------------------------------------=[ Effects ]
[23/09 20:05:10] Error executing script!
java.lang.NullPointerException
at org.mdkt.compiler.InMemoryJavaCompiler.compileAll(InMemoryJavaCompiler.java:80)
at org.mdkt.compiler.InMemoryJavaCompiler.compile(InMemoryJavaCompiler.java:126)
at com.l2jserver.gameserver.scripting.ScriptEngineManager.compileScript(ScriptEngineManager.java:179)
at com.l2jserver.gameserver.scripting.ScriptEngineManager.executeScript(ScriptEngineManager.java:190)
at com.l2jserver.gameserver.scripting.ScriptEngineManager.executeScript(ScriptEngineManager.java:197)
at com.l2jserver.gameserver.handler.EffectHandler.executeScript(EffectHandler.java:65)
at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:197)
at com.l2jserver.gameserver.GameServer.main(GameServer.java:460)
Exception in thread "main" java.lang.NullPointerException
at com.l2jserver.gameserver.scripting.ScriptEngineManager.runMain(ScriptEngineManager.java:233)
at com.l2jserver.gameserver.scripting.ScriptEngineManager.executeScript(ScriptEngineManager.java:192)
at com.l2jserver.gameserver.scripting.ScriptEngineManager.executeScript(ScriptEngineManager.java:197)
at com.l2jserver.gameserver.handler.EffectHandler.executeScript(EffectHandler.java:65)
at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:197)
at com.l2jserver.gameserver.GameServer.main(GameServer.java:460)
PS: JDK version 10 (and set path JAVA_HOME in system variables), Windows 10
Comments (14)
-
reporter -
reporter -
reporter - edited description
-
I was getting same errors. Found source - it was system variable pointing to jre instead of jdk. Else you can try to set absolute path to jdk 10 executable directly in startgameserver.bat maybe it helps...
-
reporter but i'm create system variable JAVA_HOME with jdk10 path
-
reporter - edited description
-
there is another variable "path" which among other paths pointing to java and it needed to set to jdk bin folder, like ...java\jdk-10\bin
remove old java paths from there if any present and just in case - various paths needed to be separated by semicolon (;)
-
eh solved the error of the script load, modifying ( System Variables name: JAVA_HOME Variable value: C: \ Program ~ 1 \ Java \ jdk1.8.0_xxx) by ( System Variables Variable name: JAVA_HOME Variable value: C: \ Program ~ 1 \ Java \ jdk10.0.2_xxx) and also modify the PATH (C: \ ProgramData \ Oracle \ Java \ javapath; C: \ Program Files (x86) \ Common Files \ Oracle \ Java \ javapath; C: \ Program ~ 1 \ Java \ jdk1.8.0_xxx) by (C: \ Program Files \ Java \ jdk-10.0.2 \ bin) this worked for me 10, I hope that you too
-
reporter - changed status to resolved
Need change path in system variables by default - "C:\Program Files (x86)\Common Files\Oracle\Java" to your JDK 10 path with bin folder
-
The answer is fine, but I put it somewhat clearer.
Add JAVA_HOME variable: JAVA_HOME: C: \ Program Files \ Java \ jdk-10.0.2
Remove from PATH variable: C: \ Program Files (x86) \ Common Files \ Oracle \ Java \ javapath
Add to PATH variable: C: \ Program Files \ Java \ jdk-10.0.2 \ bin (at the beginning of everything)
(do not forget to close the cmd window and reopen it, to do the test)
-
Notice to others: Place JAVA_HOME + PATH into the system not in the user setting
-
Having same issue on Ubuntu, wondering if anyone found a fix?
-
Same here
-
- Log in to comment