Ok , merci 🙂
Voici le code que j’ai fait .
Runtime runtime = Runtime.getRuntime();
String[] args = { "javaw.exe", "-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump", "-Xmx1G", "-Djava.library.path=[Dossiser natives]", "-cp", "[DestJeu]\libraries\net\minecraftforge\minecraftforge\9.11.1.953\minecraftforge-9.11.1.953.jar;[DestJeu]\libraries\net\minecraft\launchwrapper\1.8\launchwrapper-1.8.jar;[DestJeu]\libraries\org\ow2\asm\asm-all\4.1\asm-all-4.1.jar;[DestJeu]\libraries\org\scala-lang\scala-library\2.10.2\scala-library-2.10.2.jar;[DestJeu]\libraries\org\scala-lang\scala-compiler\2.10.2\scala-compiler-2.10.2.jar;[DestJeu]\libraries\lzma\lzma\0.0.1\lzma-0.0.1.jar;[DestJeu]\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;[DestJeu]\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;[DestJeu]\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;[DestJeu]\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;[DestJeu]\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;[DestJeu]\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;[DestJeu]\libraries\argo\argo\2.25_fixed\argo-2.25_fixed.jar;[DestJeu]\libraries\org\bouncycastle\bcprov-jdk15on\1.47\bcprov-jdk15on-1.47.jar;[DestJeu]\libraries\com\google\guava\guava\14.0\guava-14.0.jar;[DestJeu]\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;[DestJeu]\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;[DestJeu]\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;[DestJeu]\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;[DestJeu]\libraries\com\google\code\gson\gson\2.2.2\gson-2.2.2.jar;[DestJeu]\libraries\org\lwjgl\lwjgl\lwjgl\2.9.0\lwjgl-2.9.0.jar;[DestJeu]\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.0\lwjgl_util-2.9.0.jar;[DestJeu]\versions\1.6.4-custom\1.6.4-custom.jar", "net.minecraft.launchwrapper.Launch", "–username thekilleurgamer", "--session token:", "--version 1.6.4-custom", "--gameDir [DestJeu]", "–assetsDir [DestJeu]\assets", "–tweakClass cpw.mods.fml.common.launcher.FMLTweaker"};
try {
final Process process = runtime.exec(args);
} catch (IOException e) {
System.out.println("Le lancement du jeu a echoué");
e.printStackTrace();
}
Pourrais tu me dire si il est potable ?
Et si je doit espacé les libraries , parce que la ils sont tous collés . Et enfin par exemple pour “–assetsDir [DestJeu]\assets”, je dois espacé les deux donnés ? (“–assetsDir”, “[DestJeu]\assets”,)
Merci
Edit : Le code ne lance pas le jeu :/[/bt]