I'm working on a launcher for the Minecraft game, what I would like to do is set the APPDATA (windows) location for the game. The value is not really changed, but it's modified for the program that executed the code. For example, it's very easy to achieve this on Mac OS X or Linux systems by changing the 'home' folders location using System.setProperty("user.home", dir);
but how do you achieve this with the APPDATA folder on windows?
Modifying this location IS possible using Batch scripts like so; APPDATA=%CD%\minecraft
.
The program/launcher is programmed using swing, and is not console based.