I launch Minecraft.exe which invokes Javaw.exe. I wish for Javaw.exe to be running in High priority because Minecraft lags if not.

I tried invoking Minecraft.exe with a high priority by doing this:

Start "Minecraft" /high "C:\Users\Barrie\Documents\Program Files\Minecraft\Minecraft.exe"

This would work if it wasn't for Minecraft loading Javaw.exe. I would love a simple solution - perhaps a command I can put into the batch script - which will change the priority of Javaw.exe after it loads.

Edit: I'd like to thank everyone for their response to my issue. I fixed this by executing Minecraft.exe with a batch script then calling an AHK script to change the priority of Javaw.exe.

link|improve this question

Running a CPU-intensive program in High priority can hang your system. – kinokijuf Dec 25 '11 at 8:31
Luckily Minecraft isn't CPU intensive it just lags a lot if javaw.exe doesn't have high priority – Arch Angel Dec 26 '11 at 17:31
feedback

4 Answers

up vote 2 down vote accepted

What I would do:

Use process explorer to get the full parameters passed to javaw to launch the game and then use them with start.

For safe guard, you can put the command in a batch file and use some command line utility to raise the priority of explorer.exe to the same level, so you can use the Windows key to escape from the game.

I don't play Minecraft, but if the above didn't work, it is probably due to some preparation work done by Minecraft.exe being omitted. In this case you may need to use some stub program to wrap either javaw.exe or the Java class it is calling.

link|improve this answer
feedback

You can do that in Task Manager, right clicking on the javaw.exe process you have a Set Priority option.

Process Explorer from Sysinternals also has that.

link|improve this answer
This guy wants to do this automatically. – kinokijuf Dec 26 '11 at 17:38
feedback

I changed the priority of it using a little batch script.

@echo off
start "Minecraft" /high "C:\Program Files\Java\jre7\bin\javaw.exe" -Xmx1024M -Xms1024M -jar "%appdata%\.minecraft\minecraft.exe"
link|improve this answer
feedback

Try Process Tamer. May not be what you exactly want but it will help. Use its configuration to set javaw.exe to high priority.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.