Jump to content
  • 0

Cannot Launch server. Get Java error.


Question

Posted

Title: Cannot Launch server. Get Java error.

Version: 3.1.1

OS: Windows 7 Home Premium

Java Version: java [32bit] version 7

Description of Problem:

When i click launch i get an error messege regarding java and it will not go any further

Error Messages:

Error Log:


C:\Users\Ty\Desktop\tekkit server\Tekkit_Server_3.1.2>java -Xmx1G -Xms1G -jar Te

kkit.jar nogui

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

operable program or batch file.

16 answers to this question

Recommended Posts

  • 0
Posted

You want the batch file in the same directory as your server (and therefore the Tekkit.jar), and the path to point to the Java executable. Java's not in that folder, so it can't find it.

The batch file will look something like:

"c:\Program Files\Java\jre7\bin\java" -jar -Xms1G -Xmx1G Tekkit.jar nogui

pause

The pause is just to let you hit a key after it closes or errors out, so you can see what's in the console window.

  • 0
Posted

"[tt];C:\Program Files (x86)\Java\jre7\bin[/tt]"

I put this at the end of the variable value is this correct. Also I'm sorry if this is a dumb question but do you want me to edit the launch.bat to mirror what you posted. Just so i don't mess this up.

  • 0
Posted

Either will work. You should put the launch.bat in the folder with your tekkit.jar and either add your line to the path variable, or change the batch file to run Java from where it's located. It doesn't especially matter which, though adding Java to the path variable will let you run Java on other things without it complaining.

  • 0
Posted

I checked and from what i can tell the launcher and jar are in the same folder also I changed the batch and this is what I'm being told now .


C:\Users\Ty\Desktop\tekkit server\Tekkit_Server_3.1.2>c:\ProgramFiles\Java\jre7\

bin\java -jar -Xms1G -Xmx1G -jar Tekkit.jar nogui

The system cannot find the path specified.

  • 0
Posted

I did that and this is the new message


C:\Users\Ty\Desktop\tekkit server\Tekkit_Server_3.1.2>c:\ProgramFiles\Java\jre7\

bin\java -jar -Xms1G -Xmx1G -jar Tekkit.jar nogui

The system cannot find the path specified.

  • 0
Posted

Do you have a 64-bit OS and run 32-bit Java? If that batch file is in the same folder as your tekkit.jar, that's the only thing I can see being wrong. Double-check to make sure java.exe actually exists in that Program Files path. You may need to change the path slightly, or install 64-bit Java if you have a 64-bit OS.

  • 0
Posted

I have a 32 bit, and should i make another folder within the folder i already have ill show you the setup in my folder here. Its not in Program Files its in Program Files (x86). Is that my problem cause i will feel stupid if it is.

  • 0
Posted

I have a 32 bit, and should i make another folder within the folder i already have ill show you the setup in my folder here. Its not in Program Files its in Program Files (x86). Is that my problem cause i will feel stupid if it is.

Are you positive your OS is 32-bit? I wasn't aware that Windows created a Program Files (x86) directory unless it was a 64-bit OS. To be completely sure, press [Windows key]-[Pause/Break] and look under "System Type" in the middle. It'll say 32-bit or 64-bit Operating System.

If you are certain of what you have, just change the directory path in your batch file to that of the (x86) folder - there's really no need to move Java. That should fix the issue.

  • 0
Posted

I do not have a pause/break key on my computer they are separate so when i tried that it didn't work but i did check and I'm an idiot i am running on a 64bit that explains why I had such a hard time getting my bukkit server working.

  • 0
Posted

I do not have a pause/break key on my computer they are separate so when i tried that it didn't work but i did check and I'm an idiot i am running on a 64bit that explains why I had such a hard time getting my bukkit server working.

You just need to use Pause then. My laptop's the same way. Anyway, good to know it's working, and at least you're persistent enough to fix the issue instead of screaming at us that it's still broken. Lots of people do that.

  • 0
Posted

Just edit the launch.bat and paste this in.

This is for Java 7 http://pastebin.com/6JYWP33p

If you need this to run for Java 6 just change

"C:\Program Files\Java\jre7\bin\java.exe"
 Into  
"C:\Program Files\Java\jre6\bin\java.exe"


 

 

 

 

The two settings that are most important


-Xmx3G


Change this Value to be whatever number you want for the maximum amount of ram the server will use [Example for 500 Megabytes: -Xmx500M] .

 


-XX:ParallelGCThreads=2

Replace the number with how many threads your processor allows if it is if your running a duel core then 2 if its a quad core then 4 is a safe number to start with.

I know this is not a standard launch script but its a better tuned one that is not really hardware specific deep java tuning its a good all round tune that is worked great and stops java running out of memory and also minimizes any lag caused by the garbage collection process.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...