Launcher: update so it works from java, fix profiles