Bon je voudrais lancer minecraft avec des mods. Mon code est fait :
Code (cpp):
String version = "1.6.4-Forge9.11.1.965";
String destJeu = appdata + "/.minecraft";
String natives = destJeu + "/versions/" + version + "/" + version + "-natives-23002029625014";
String javaPath = System.getProperty("java.home") + "/bin/";
String pseudo = "thekilleurgamer";
char separator;
String os = System.getProperty("os.name").toUpperCase();
if(os.contains("WIN"))
separator = ';';
else
separator = ':';
try {
String[] commande = {javaPath + "java", "-Xmx1G", "-Xmn128M", "-Djava.library.path=" + natives, "-cp", destJeu + "/libraries/net/minecraftforge/minecraftforge/9.11.1.965/minecraftforge-9.11.1.965.jar" + separator + destJeu + "/libraries/net/minecraft/launchwrapper/1.8/launchwrapper-1.8.jar" + separator + destJeu + "/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar" + separator + destJeu + "/libraries/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.jar" + separator + destJeu + "/libraries/org/scala-lang/scala-compiler/2.10.2/scala-compiler-2.10.2.jar" + separator + destJeu + "/libraries/lzma/lzma/0.0.1/lzma-0.0.1.jar" + separator + destJeu + "/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar" + separator + destJeu + "/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar" + separator + destJeu + "/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar" + separator + destJeu + "/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar" + separator + destJeu + "/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar" + separator + destJeu + "/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar" + separator + destJeu + "/libraries/argo/argo/2.25_fixed/argo-2.25_fixed.jar" + separator + destJeu + "/libraries/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47.jar" + separator + destJeu + "/libraries/com/google/guava/guava/14.0/guava-14.0.jar" + separator + destJeu + "/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar" + separator + destJeu + "/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar" + separator + destJeu + "/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" + separator + destJeu + "/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar" + separator + destJeu + "/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar" + separator + destJeu + "/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0.jar" + separator + destJeu + "/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0.jar" + separator + destJeu + "/versions/" + version + "/" + version + ".jar", "net.minecraft.launchwrapper.Launch", "--username", pseudo, "--version", version, "--gameDir", destJeu, "--assetsDir", destJeu + "/assets", "--tweakClass", "cpw.mods.fml.common.launcher.FMLTweaker"};
Process p = Runtime.getRuntime().exec(commande);
BufferedReader output = getOutput(p);
BufferedReader error = getError(p);
String ligne = "";
while ((ligne = output.readLine()) != null) {
System.out.println(ligne);
}
while ((ligne = error.readLine()) != null) {
System.out.println(ligne);
}
p.waitFor();
} catch (IOException e1) {
e1.printStackTrace();
} catch (InterruptedException e1) {
e1.printStackTrace();
}
System.out.println("Fin du programme");
Il lance bien minecraft forge , mais le problème c'est qu'il ne lance pas minecraft avec les musiques :/ Pouvez-vous m'aider ?