synthe Posted August 30, 2014 Posted August 30, 2014 'java' is not recognized as an internal or external command, operable program or batch file. Administrator Restarted ... Starting L2JCobra Game Server. Can someone tell me why this error shows up? And how do i fix this? It's appearing when I start the gameserver.
0 Rey Posted August 30, 2014 Posted August 30, 2014 You need to configure your environment variables, JAVA_HOME and PATH. JAVA_HOME must contain the path to java, and you should add %JAVA_HOME%\bin to PATH Alternatively, you can simply add to your PATH the whole path to the bin folder, without the JAVA_HOME variable, however, this makes a little more annoying when you need to have more than one java version on your machine (that way you only need to change JAVA_HOME and don't even bother with PATH)
0 synthe Posted August 30, 2014 Author Posted August 30, 2014 You need to configure your environment variables, JAVA_HOME and PATH. JAVA_HOME must contain the path to java, and you should add %JAVA_HOME%\bin to PATH Alternatively, you can simply add to your PATH the whole path to the bin folder, without the JAVA_HOME variable, however, this makes a little more annoying when you need to have more than one java version on your machine (that way you only need to change JAVA_HOME and don't even bother with PATH) Yeah I did that, but still the same error. This is my config And this is the bat file config @echo off title L2JCobra: Game Server Console :start echo Starting L2JCobra Game Server. echo. REM ------------------------------------------------------------------------ REM #======================================================================# REM # You need to set here your JDK/JRE params in case of x64 bits System. # REM # Remove the "REM" after set PATH variable # REM # If you're not a x64 system user just leave # REM #======================================================================# set PATH="C:\Program Files\MySQL\MySQL Server 5.1\bin" REM ------------------------------------------------------------------------ REM ------------------------------------- REM Default parameters for a basic server. java -Dfile.encoding=UTF-8 -Xmx4000m -cp bsf.jar;bsh-engine.jar;bsh-2.0b5.jar;mmocore.jar;javolution.jar;c3p0-0.9.1.2.jar;mysql-connector-java-5.1.6-bin.jar;l2jteon.jar;jython.jar;jython-engine.jar;commons-logging-1.1.jar;java-engine.jar net.sf.l2j.gameserver.GameServer REM REM If you have a big server and lots of memory, you could experiment for example with REM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts REM ------------------------------------- if ERRORLEVEL 2 goto restart if ERRORLEVEL 1 goto error goto end :restart echo. echo Administrator Restarted ... echo. goto start :error echo. echo GameServer Terminated Abnormaly, Please Verify Your Files. echo. :end echo. echo GameServer Terminated. echo. pause
0 Rey Posted August 30, 2014 Posted August 30, 2014 (edited) Yeah I did that, but still the same error. This is my config And this is the bat file config @echo off title L2JCobra: Game Server Console :start echo Starting L2JCobra Game Server. echo. REM ------------------------------------------------------------------------ REM #======================================================================# REM # You need to set here your JDK/JRE params in case of x64 bits System. # REM # Remove the "REM" after set PATH variable # REM # If you're not a x64 system user just leave # REM #======================================================================# set PATH="C:\Program Files\MySQL\MySQL Server 5.1\bin" REM ------------------------------------------------------------------------ REM ------------------------------------- REM Default parameters for a basic server. java -Dfile.encoding=UTF-8 -Xmx4000m -cp bsf.jar;bsh-engine.jar;bsh-2.0b5.jar;mmocore.jar;javolution.jar;c3p0-0.9.1.2.jar;mysql-connector-java-5.1.6-bin.jar;l2jteon.jar;jython.jar;jython-engine.jar;commons-logging-1.1.jar;java-engine.jar net.sf.l2j.gameserver.GameServer REM REM If you have a big server and lots of memory, you could experiment for example with REM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts java -Dfile.encoding=UTF-8 -Xmx4000m -version:1.6 -Djav... -cp bsf.jar;bsh-engine.jar;bsh-2.0b5.jar;mmocore.jar;javolution.jar;c3p0-0.9.1.2.jar;mysql-connector-java-5.1.6-bin.jar;l2jteon.jar;jython.jar;jython-engine.jar;commons-logging-1.1.jar;java-engine.jar Edited August 30, 2014 by Rey
0 synthe Posted August 30, 2014 Author Posted August 30, 2014 also go in "cmd" and type java -version Fixed, used other pack
0 Rey Posted August 30, 2014 Posted August 30, 2014 Fixed, used other pack java -Dfile.encoding=UTF-8 -Xmx4000m -version:1.6 -Djav... -cp bsf.jar;bsh-engine.jar;bsh-2.0b5.jar;mmocore.jar;javolution.jar;c3p0-0.9.1.2.jar;mysql-connector-java-5.1.6-bin.jar;l2jteon.jar;jython.jar;jython-engine.jar;commons-logging-1.1.jar;java-engine.jar this could fix your problem anyway.
Question
synthe
7 answers to this question
Recommended Posts