3

I know how to set the Minecraft offline mode player name via:

Java -Xms512m -Xmx1024m -cp "%APPDATA%\.minecraft\bin\*"
     -Djava.library.path="%APPDATA%\.minecraft\bin\natives"  
      net.minecraft.client.Minecraft "MyName"

How do I pass more parameters to the Minecraft jar file? For instance, I would like to pass the directory parameter to the jar.

Also is it possible to make it so that the above line is executed through a Java applet?

Any help is much appreciated :)

au revoir
  • 10,839
  • 13
  • 60
  • 101
Sphinx
  • 31
  • 1
  • 1
  • 3
  • This article may help: http://en.kioskea.net/faq/9814-portable-minecraft-minecraft-on-your-usb-key. It discusses changing the directory. – Alexis King Mar 03 '12 at 02:52
  • why would you want to launch via applet? you already can do that at minecraft.net – Lysol Mar 08 '12 at 17:05
  • Shouldn't this question be on StackOverflow or something of the sort? Like maybe SuperUser? –  Oct 30 '12 at 17:28

2 Answers2

2

Disclaimer: I did write the tool I'm going to suggest to use. So, yes, this is shameless self-promotion. And no, this does not include any jars from Mojang, it is a stand-alone launcher-like...uuhhh...thingy...

You can do that with the EasyMineLauncher. It will allow you to set:

  • The directory of the jars
  • The minecraft.jar directly (which allows renaming of said jar)
  • The directory of lwjgl
  • The directory of the lwjgl native files
  • The directory in which the .minecraft directory is stored
  • A username
  • Some window options
  • A server and port to directly connect to

The following drawbacks are coming with that:

  • No updates
  • No authentication (not sure if you can play on Online servers which demand authentication or not)

You can check out the Readme for some further information.

Bobby
  • 1,039
  • 2
  • 9
  • 18
0

I wrote a batch script that was originally for myself to put the .minecraft folder in the same directory as the launcher. I am not really sure what you are asking since your question is a bit vague. Assuming that minecraft is in C:\minecraft and that launch-minecraft.bat is in C:\minecraft, you can put this in launch-minecraft.bat to make .minecraft be in C:\minecraft:

@ECHO OFF
CD /D %~dp0
<your code here>

where @ECHO OFF is to make the display cleaner, CD /D %~dp0 makes it so that it changes the working directory to where the batch script is located, and <your code here> is the code you want to use. Using this, your file structure should look like this (my ASCII art might be messed up on some systems):

C:
|_ Minecraft
....|_ launch-minecraft.bat
....|_ .minecraft