portablemc icon indicating copy to clipboard operation
portablemc copied to clipboard

Start a custom jar

Open xandaaah opened this issue 10 months ago • 1 comments

I have a custom jar to launch, and the API docs have nothing on like specifying a path to the jar, or anything like that.

xandaaah avatar Apr 19 '24 13:04 xandaaah

Hi! To launch a custom JAR you have to conform to how .minecraft directories work (so-called "main dir"). In fact, you need to create a directory for your version under <main dir>/versions, and inside it, you also need to add a version metadata file <your version>.json, this metadata is really important as it tells the launcher how to build the command line to start your jar, which libraries to use, etc. You can check how mojang's versions are crafted and base your one on this.

Here is a sample directory structure, if your main dir is .minecraft and your custom version is named hello:

  • .minecraft
    • versions
      • hello
        • hello.json
        • hello.jar

mindstorm38 avatar Apr 19 '24 17:04 mindstorm38