Jump to content

Recommended Posts

Posted

I've been trying to start a tekkit server, but when I try to open the batch file it says:

C:/Users/clarson/Desktop/Tekkit Server>java -Xms3G Xmx3G -jar Tekkit.jar nogui

'java' is not recognized as a internal or external command,

operable program or batch file.

C:/Users/clarson/Desktop/Tekkit Server>pause

Press any key to continue . . .

So I press any key ; and then the batch file instantly closes,

what do i do i need help

Posted

your path variable is not set properly. use this as you start.bat

@Echo OFF

:start

 

Set jarname=Tekkit.jar

 

SET BINDIR=%~dp0

CD /D "%BINDIR%"

color 7

cls

 

if exist {C:\Program Files\Java\jre7\bin\java.exe} (

color A

Echo.

Echo 64 Bit mode

ping 1.1.1.1 -w 1 >NUL

cls

color 7

"C:\Program Files\Java\jre7\bin\java.exe" -Xms1G -Xmx4G -jar %jarname%

goto end

 

) else (

 

color C

Echo.

Echo 32 bit mode

ping 2.2.2.2 -w 1 >NUL

cls

color 7

"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xms1G -Xmx3G -jar %jarname%

goto end

)

 

:end

cls

color E

Echo.

Echo STOPPED! CLOSE NOW TO STOP FULLY!

ping 1.1.1.1 -w 5 >NUL

ping 2.2.2.2 -w 5 >NUL

goto start

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...