Disclaimer: The tool I'm going to suggest was written by me, so yes, this is once more self-promotion...shamelessly of course!
Yes, this is possible with the EasyMineLauncher I wrote some time ago for exactly this purpose. It will allow you to
- Set the minecraft-directory
- Set the minecraft-data-directory
- Set the directory of the LWJGL-natives
- Set an offline username
- And some more stuff...see the README
But comes with the following drawbacks:
- No authentication
- No updates
You can directly launch a minecraft.jar, no matter where it is or how it is named like this:
java -Xmx1024M -Xms1024M -jar EasyMineLauncher.jar --jar=./versions/minecraft_1.2.3.jar --username=YourAwseomeUsername
This will catapult you to the menu of 1.2.3, but you also need the other .jars in that directory together with the natives-directory. F.e., I use the following file/directory layout:
Minecraft-Versions
1.6.6.jar
1.7.3.jar
1.8.3.jar
and some more versions...
jinput.jar
lwjgl.jar
lwjgl_util.jar
d lwjgl-natives
That would allow you to write a simple launcher-script like this:
#!/bin/sh
# launcher.sh
java -Xmx1024M -Xms1024M -jar EasyMineLauncher.jar \
--jar=./Minecraft-Versions/$1.jar \
--lwjgl-dir=./Minecraft-Versions/ \
--native-dir=./Minecraft-Versions/lwjgl-natives/ \
--username=YourUsername \
--maximized \
--title=Minecraft\ ($1)
Then you can write launchers like this:
./launcher.sh 1.7.3
And wham, done.
Or, if you want to have portable versions, just copy the .minecraft
directory, rename it and use this:
#!/bin/sh
# ~/MinecraftPortable/1.7.3/launcher.sh
java -Xmx1024M -Xms1024M -jar EasyMineLauncher.jar \
--jar-dir=./bin/ \
--parent-dir=./ \
--username=YourName