Jump to content
  • 0

Using extra Java flags before launcher minecraft


Question

Posted

Is there a way to add additional Java params before launching minecraft? With MagicLauncher, I can add the following flags -Dhttp.proxyHost=somehost -Dhttp.proxyPort=3128

In fact, I need to specify a proper proxy before I can login to minecraft. I launch technic launcher the following way:

java -Dhttp.proxyHost=somehost -Dhttp.proxyPort=3128 -jar ~/Downloads/technic-launcher-latest.jar

If I don't do it this way, I will fail to authenticate (our standard silent proxy gives a 403 error at this point). This is fine for playing on single player maps, but will fail if I tried SMP (403 error).

6 answers to this question

Recommended Posts

  • 0
Posted

there is, actually. you will need to make a very short (2 line) batch file. the trick is to create a folder called "rtemp" in the .techniclauncher folder before running the .jar with whatever java args you want. something like:

mkdir %appdata%\.techniclauncher\rtemp

java [insert args here] -jar %appdata%\.techniclauncher\technic-launcher.jar

  • 0
Posted

Thanks, that works well! I can see from my proxy logs that it's now doing more work, and I can now do tekkit things. I'm on linux, so the resulting command looks like this:

mkdir .techniclauncher/rtemp

java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -jar ~/Downloads/technic-launcher-latest.jar

It's not documented anywhere though, either that or I missed it. It does look like a verbose debug session.

  • 0
Posted

the directory thing is not documented really, you're right. I only know about it because I saw the launcher dev, who's name I can't remember well enough to spell correctly (sorry, laser blasting mutated cow guy!), mention it in a thread once.

  • 0
Posted

I would like to launch the actual Minecraft instance with extra flags instead of the launcher. I tried checking the launcher's source, and it looks to me like it's directly loading classes and invoking them, rather than re-invoking the JVM, meaning the launcher invocation is the only time extra flags can be used. Is this true?

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...