-3

I came up with this command so far:

java -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path=C:\Users\root\AppData\Roaming\.minecraft\versions\1.8.9\1.8.9-natives -cp C:\Users\root\AppData\Roaming\.minecraft\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar net.minecraft.client.main.Main --username Stefan15ist --version, 1.8.9 --gameDir C:\Users\root\AppData\Roaming\.minecraft --assetsDir C:\Users\root\AppData\Roaming\.minecraft\assets --assetIndex 1.8 --uuid 00000000-0000-0000-0000-000000000000 --accessToken --userProperties --userType legacy

but when i run it, I get the following error:

Error: Could not find or load main class net.minecraft.client.main.Main

any help is appreciated.

  • 1
    Which command line? Java? cmd? another? – Bloodied Feb 07 '16 at 03:41
  • Command Prompt. (Windows) – Stefan Bostan Feb 07 '16 at 03:50
  • Unfortunately, Minecraft requires a valid session token, sent with your login credentials to **https://login.minecraft.net** so sadly this can't be done in cmd without security warnings or a different scripting language. I know it can be done in C# and C++. CMD just doesn't have the ability to ping a webpage and collect the return data. – Bloodied Feb 07 '16 at 03:56
  • I'm not interested in logging in to the minecraft website, I want to be able to join an offline server in my localhost – Stefan Bostan Feb 07 '16 at 03:57
  • @Arescet You can use an existing token if you already have it (and the token is put into the logs). – Pokechu22 Feb 09 '16 at 16:53

1 Answers1

-1

This, this and this may explain things.

Sadly you'll have to either connect to their website or disable your internet/block the launcher from sending requests. Minecraft doesn't naturally support connecting offline while its connected to the internet. Both options are impossible for a language like CMD with the default launcher.

Bloodied
  • 992
  • 7
  • 19