Tutoriel [Guide] [MAJ 12/07/14]Créer un launcher pour 1.6.2/1.6.4 avec mods

Statut
N'est pas ouverte pour d'autres réponses.
Bonjour à tous, je viens de faire mon launcher, de régler qques soucis au lancement, mais la je bloque depuis un moment sur un problème, j'ai un soucis avec le PermGen size, je souhaite le mettre à 256Mo par défaut, c'est à dire que les utilisateurs n'aient pas à le changer eux même, j'ai beau chercher ou je dois changer le paramètre dans les sources , je ne trouve rien, je n'ai rien trouvé non plus sur google concernant ce point, ni sur cette discussion malheureusement ...
Donc si qqun a une idée ou le code à placer dans les sources java je suis preneur :)
Merci d'avance :)
 
J'ai fini par trouver la solution en "tâtonnant" un peut dans le code source !
Pour les intéressés, tout se passe dans Eclipse, il faut aller dans le fichier minecraft-launcher->src/main/java->net.minecraft.launcher->GameLauncher.java

recherchez ensuite la ligne :
Code:
final String defaultArgument = is32Bit ? "-Xmx512M" : "-Xmx1G";
et remplacez la par :
Code:
final String defaultArgument = is32Bit ? "-Xmx512M -XX:PermSize=256m" : "-Xmx1G -XX:PermSize=256m";

et voilà, plus besoin d'aller éditer les options du profile dans le launcher pour démarrer un modpack avec beaucoup de mods !
 
Salut et merci pour ce tuto par contre moi aussi jai un problème donc voila:

j'ai ce message d'erreur qui apparait dans le launcher minecraft:

Launcher 1.0.0 (through bootstrap 5) started on windows...
Current time is Feb 11, 2014 8:56:57 PM
System.getProperty('os.name') == 'Windows 7'
System.getProperty('os.version') == '6.1'
System.getProperty('os.arch') == 'amd64'
System.getProperty('java.version') == '1.7.0_07'
System.getProperty('java.vendor') == 'Oracle Corporation'
System.getProperty('sun.arch.data.model') == '64'
Refreshing local version list...
Refreshing remote version list...
Refresh complete.
Couldn't download resources
java.io.IOException: Server returned HTTP response code: 403 for URL: http://resources.download.minecraft.net/
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at net.minecraft.launcher.updater.VersionManager.getResourceFiles(VersionManager.java:135)
at net.minecraft.launcher.updater.VersionManager.downloadResources(VersionManager.java:58)
at net.minecraft.launcher.Launcher$1.run(Launcher.java:154)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Loaded 1 profile(s); selected 'theogiraudet'
Refreshing auth...
Logging in with access token
Delta time to compare resources: 101 ms
Download job 'Resources' skipped as there are no files to download
Job 'Resources' finished successfully
Starting Listing and Deleting bad mods...
Local File C:\Users\Théo\AppData\Roaming\.En_craft_inconnu\mods\OptiFine_1.6.2_HD_C4.jar checked with 8d83cc1cef7902ede0bf072c005b51cd hash value
Distant File checked with c56f5a7171de466a89916c67a056d757 hash value
Distant File checked with e32e21dff86b2f4c3e9cf44f437b74cb hash value
Distant File checked with 8d83cc1cef7902ede0bf072c005b51cd hash value
Distant File checked with 124fb6bc0fc49496ed9164f1a84a4516 hash value
Local Files ETags : [8d83cc1cef7902ede0bf072c005b51cd, d41d8cd98f00b204e9800998ecf8427e]
Server Files ETags : [c56f5a7171de466a89916c67a056d757, e32e21dff86b2f4c3e9cf44f437b74cb, 124fb6bc0fc49496ed9164f1a84a4516, 8d83cc1cef7902ede0bf072c005b51cd]
Getting syncinfo for selected version
Queueing library & version downloads
Unhandled exception in executor net.minecraft.launcher.updater.ExceptionalThreadPoolExecutor$ExceptionalFutureTask@48765135
java.util.concurrent.ExecutionException: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 31 column 16
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at net.minecraft.launcher.updater.ExceptionalThreadPoolExecutor$ExceptionalFutureTask.done(ExceptionalThreadPoolExecutor.java:29)
at java.util.concurrent.FutureTask$Sync.innerSetException(Unknown Source)
at java.util.concurrent.FutureTask.setException(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 31 column 16
at com.google.gson.Gson.fromJson(Gson.java:818)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at net.minecraft.launcher.updater.VersionList.getCompleteVersion(VersionList.java:85)
at net.minecraft.launcher.updater.VersionManager.getLatestCompleteVersion(VersionManager.java:103)
at net.minecraft.launcher.GameLauncher.playGame(GameLauncher.java:405)
at net.minecraft.launcher.ui.bottombar.PlayButtonPanel$1$1.run(PlayButtonPanel.java:34)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
... 5 more
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated object at line 31 column 16
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:480)
at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:166)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.Gson.fromJson(Gson.java:803)
... 13 more

Si quelqu'un sait comment régler le problème svp ^^
 
Oromis: Vérifie bien dans ton dossier versions --> taversion dans le fichier json que ton lien vers le dossier maven est bien correct ;)

"com.google.gson.stream.MalformedJsonException: Unterminated object at line 31 column 16"
 
  • J'aime
Reactions: Oromis
Merci beaucoup le problème venait bien de la ligne 31 du .json où il manquait une guillemet ^^"

Je te remercie énormement car maintenant mon launcher marche !!

Et merci aussi au créateur de ce tutoriel !!
 
Bonjour, j'ai un problème de connexion sur les serveur multi 1.7, jai ce message qui s'affiche dans la console : GameProfile{id='null', name='nicecube'} (/127.0.0.1:63268) lost connection: Disconnected quelqu'un a une solution pour réglé ce problème ? Sinon super tuto ! Beau travail
 
Bonjour,

J'ai un énorme problème et je pense que vous avez TOUS le même, car j'ai suivi le tuto à la lettre.

Mon launcher re-télécharge le .jar à CHAQUE lancement O_O et il télécharge d'autres fichiers aussi, car il met un très gros temps à se lancé par rapport à l'officiel, cependant il ne re-DL pas TOUTES les assets (ça dure bcp moins longtemps quand même).

Je trouve ça inutile de RE-DL à chaque fois, ça fait ralentir le joueur etc... une idée les gars ? Car là O_O
 
Moi j'ai cette erreur :
Code:
Refreshing local version list...
Refreshing remote version list...
Launcher 1.0 (through bootstrap 5) started on osx...
Current time is Feb 15, 2014 12:06:33 PM
System.getProperty('os.name') == 'Mac OS X'
System.getProperty('os.version') == '10.6.8'
System.getProperty('os.arch') == 'x86_64'
System.getProperty('java.version') == '1.6.0_51'
System.getProperty('java.vendor') == 'Apple Inc.'
System.getProperty('sun.arch.data.model') == '64'
Unexpected exception refreshing version list
java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils
    at net.minecraft.launcher.Http.performGet(Http.java:61)
    at net.minecraft.launcher.updater.RemoteVersionList.getContent(RemoteVersionList.java:21)
    at net.minecraft.launcher.updater.VersionList.refreshVersions(VersionList.java:120)
    at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:301)
    at net.minecraft.launcher.Launcher$3.run(Launcher.java:324)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
 
Loaded 0 profile(s); selected 'Username'
Unhandled exception in executor net.minecraft.launcher.updater.ExceptionalThreadPoolExecutor$ExceptionalFutureTask@9be1041
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at net.minecraft.launcher.updater.ExceptionalThreadPoolExecutor$ExceptionalFutureTask.done(ExceptionalThreadPoolExecutor.java:29)
    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    at net.minecraft.launcher.profile.ProfileManager.saveProfiles(ProfileManager.java:137)
    at net.minecraft.launcher.Launcher.showLoginPrompt(Launcher.java:348)
    at net.minecraft.launcher.Launcher.ensureLoggedIn(Launcher.java:170)
    at net.minecraft.launcher.Launcher$3.run(Launcher.java:337)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    ... 4 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 10 more
 
Couldn't download resources
java.io.IOException: Server returned HTTP response code: 403 for URL: http://resources.download.minecraft.net/
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
    at net.minecraft.launcher.updater.VersionManager.getResourceFiles(VersionManager.java:135)
    at net.minecraft.launcher.updater.VersionManager.downloadResources(VersionManager.java:58)
    at net.minecraft.launcher.Launcher$1.run(Launcher.java:154)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
 
Delta time to compare resources: 24 ms
Download job 'Resources' skipped as there are no files to download
Job 'Resources' finished successfully
Starting Listing and Deleting bad mods...
Couldn't check local file hash : java.io.FileNotFoundException: /Users/Baptiste/Library/Application Support/minevita/mods (No such file or directory)
Local Files ETags : [d41d8cd98f00b204e9800998ecf8427e]
Server Files ETags : []
Can't run deleting old mods method : java.io.FileNotFoundException: /Users/Baptiste/Library/Application Support/minevita/mods (No such file or directory)
Getting syncinfo for selected version
Unhandled exception in executor net.minecraft.launcher.updater.ExceptionalThreadPoolExecutor$ExceptionalFutureTask@7c2479a4
java.util.concurrent.ExecutionException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at net.minecraft.launcher.updater.ExceptionalThreadPoolExecutor$ExceptionalFutureTask.done(ExceptionalThreadPoolExecutor.java:29)
    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at net.minecraft.launcher.GameLauncher.playGame(GameLauncher.java:394)
    at net.minecraft.launcher.ui.bottombar.PlayButtonPanel$1$1.run(PlayButtonPanel.java:34)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    ... 4 more


PS: Le Lien des Ressources Amazon est dead :s
 
Statut
N'est pas ouverte pour d'autres réponses.