# Is it possible to use a different folder than .minecraft? [duplicate]

Possible Duplicate:
How do I keep two different versions of Minecraft installed?

My problem is that I can run minecraft from a different folder, but when I run it, it is still using .minecraft folder. It saves the worlds there and so on. How can I run it like "everything get from and save to my folder"?

-

## marked as duplicate by SevenSidedDie, Michel, Ilya Melamed, Shadur, DrFishJan 11 '13 at 7:51

Hey, @DragonCz, welcome to Arqade! I've taken out the programming part of your question because that's outside our expertise. –  Frank Jan 10 '13 at 16:40

Disclaimer: This is (once more) a post about the tool I wrote for this actual purpose. So yes, this is self-promotional...kind of. Well, not kind of actually, it is self-promotional...sorry. As further full disclosure, I do not know of any other launchers which can do that, only of the workaround I'll post in the next few seconds.

If you can live with the limitation that you won't be able to login at Mojang (and so can't play on servers which demand authentication) you can use the EasyMineLauncher. It is a simple replacement for the official launcher which grants you all kinds of options, but the important one for you is to change the home directory.

You can do it like this:

java -jar -Xmx1024M -Xms1024M EasyMineLauncher.jar --parent-dir=/path/to/your/new/dir/


Additionally, the launcher will give you some further options:

• 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 of the .minecraft directory (by default ~/)
• Some window options
• A server and port to directly connect to

-
Thanks, I will try to read the code and get something usefull from it on how to do it. Thanks anyway –  DragonCz Jan 10 '13 at 18:23
if it doesn't need you to log in this isn't allowed –  ratchet freak Jan 10 '13 at 18:23
@ratchetfreak: Care to elaborate? I didn't read that restriction somewhere. I do not distribute any jar from Mojang (so you'll need an account to download it) and the official Mineraft.jar can be easily launched in a pretty similar matter (see your own answer), so I fail to see the problem. –  Bobby Jan 10 '13 at 18:28
@ratchetfreak That's only if it allows multiplayer without a login. Though a launcher that doesn't handle logins does feel a bit shady, it's not violating any of Mojang's rules. –  SevenSidedDie Jan 11 '13 at 2:08

Where the exe is to run does not matter. The Java code for Minecraft uses the .minecraft folder. If you wish to use a different location, for example so you can run multiple configurations for your Minecraft, you will need to mod the jar files, or just get one of the ones that already exist.

-
get a link of one that exists? –  Paralytic Jan 10 '13 at 16:38
I want to make my own launcher because I am making my own modpack and want to distribute it to some of my friends. How can I mod it to run from a different folder? –  DragonCz Jan 10 '13 at 16:41
@DragonCz Modding is also outside Arqade's scope. I'd recommend asking anything to do with modding should be asked on our sister site, gamedev.SE. –  Frank Jan 10 '13 at 16:43
While I haven't tried to mod it myself, this looks promising: technicpack.net –  Pyrodante Jan 10 '13 at 16:44
-1, that's not true, the path for the Minecraft-Home-Dir can be altered through multiple means. –  Bobby Jan 10 '13 at 18:03

MultiMC will not use the .minecraft folder IIRC

you can also start the minecraft jar directly by adding all jars in the bin folder to the classpath and running with main class net.minecraft.MineCraft

-
Will the last one alter the location Minecraft will be looking for saves etc.? –  Bobby Jan 10 '13 at 18:23
that will (I think) use the parent folder of where the jar is located (which needs to be .minecraft like) –  ratchet freak Jan 10 '13 at 18:24

Minecraft uses the user.home (Java) system property to determine the location of the home directory of the user. You can change the system-variable responsible for it and so alter the location of the .minecraft directory.

Linux (and alike):

#!/bin/sh

export HOME=/path/to/your/target
java -jar -Xmx1024M -Xms1024M minecraft.jar


Windows:

set APPDATA=D:\path\to\your\target
java -jar -Xmx1024M -Xms1024M minecraft.jar


Another possibility would be to symlink the directory (at least on Linux and Unix-like OSs). Something along the lines of this:

\$ ln -s ~/.minecraft /path/to/your/target/

-
It is possible to create symbolic links in Windows, see this answer on SuperUser: superuser.com/questions/478095/… –  Sean May 3 '14 at 13:42