Can I play Minecraft on a USB flash drive?

PortableApps hosts a Minecraft Portable launcher that will run off a USB stick, though you have to run it once for it to download and store the data and binaries from minecraft.net (as required by the Minecraft end-user license). I haven't tested it, but it claims to use the native launcher to be forward-compatible as new versions of Minecraft are released.

On the Minecraft Forums, there is a Java-based portable launcher that explicitly advertises compatibility with version 1.8.

There is also an article about creating a Windows batch file by hand that will make Minecraft look for its files and your saves on a USB key.


@echo off
Title Minecraft Launcher
set APPDATA=%CD%\
start %CD%\minecraft.exe

Save that into a .bat file in the same folder as Minecraft on your flash drive.

Presto!

I don't know how to do the same on a Mac, though.


For people who want to do this in the future:

Mac:

Step 1: Open TextEdit then go to the menu on Top>Format>Make Plain Text, then type in these codes one by one:

#!/bin/bash
echo Minecraft Launcher
cd /Volumes/FLASH\ DRIVE\ NAME
HOME=/Volumes/FLASH\ DRIVE\ NAME
open Minecraft.app

Replace FLASH\ DRIVE\ NAME with what you of your drive and escape spaces using \.

Step 2: Save this file as as ANYTHING.command

Step 3: Open Terminal and type chmod +x

Step 4: Drag the file to the window and press return. Thats it.

Windows:

Step 1: Open Notepad and type

@echo off
Title Minecraft Launcher
set APPDATA="%CD%\Library\Application Support"
start %CD%\minecraft.exe

Step 2: Save it as ANYTHING.bat