Hi everyone, first time poster so I apologise if I'm not that great.

Basically, I am looking into creating a Minecraft Launcher and I cannot for the life of me get this to work correctly.

public static String authCode = "cmd javaw.exe -Xmx1G -Djava.library.path=\"%APPDATA%\\.minecraft\\versions\\1.6.2\\1.6.2-natives\" -cp \"%APPDATA%\\.minecraft\\libraries\\net\\sf\\jopt-simple\\jopt-simple\\4.5\\jopt-simple-4.5.jar;%APPDATA%\\.minecraft\\libraries\\com\\paulscode\\codecjorbis\\20101023\\codecjorbis-20101023.jar;%APPDATA%\\.minecraft\\libraries\\com\\paulscode\\codecwav\\20101023\\codecwav-20101023.jar;%APPDATA%\\.minecraft\\libraries\\com\\paulscode\\libraryjavasound\\20101123\\libraryjavasound-20101123.jar;%APPDATA%\\.minecraft\\libraries\\com\\paulscode\\librarylwjglopenal\\20100824\\librarylwjglopenal-20100824.jar;%APPDATA%\\.minecraft\\libraries\\com\\paulscode\\soundsystem\\20120107\\soundsystem-20120107.jar;%APPDATA%\\.minecraft\\libraries\\argo\\argo\\2.25_fixed\\argo-2.25_fixed.jar;%APPDATA%\\.minecraft\\libraries\\org\\bouncycastle\\bcprov-jdk15on\\1.47\\bcprov-jdk15on-1.47.jar;%APPDATA%\\.minecraft\\libraries\\com\\google\\guava\\guava\\14.0\\guava-14.0.jar;%APPDATA%\\.minecraft\\libraries\\org\\apache\\commons\\commons-lang3\\3.1\\commons-lang3-3.1.jar;%APPDATA%\\.minecraft\\libraries\\commons-io\\commons-io\\2.4\\commons-io-2.4.jar;%APPDATA%\\.minecraft\\libraries\\net\\java\\jinput\\jinput\\2.0.5\\jinput-2.0.5.jar;%APPDATA%\\.minecraft\\libraries\\net\\java\\jutils\\jutils\\1.0.0\\jutils-1.0.0.jar;%APPDATA%\\.minecraft\\libraries\\com\\google\\code\\gson\\gson\\2.2.2\\gson-2.2.2.jar;%APPDATA%\\.minecraft\\libraries\\org\\lwjgl\\lwjgl\\lwjgl\\2.9.0\\lwjgl-2.9.0.jar;%APPDATA%\\.minecraft\\libraries\\org\\lwjgl\\lwjgl\\lwjgl_util\\2.9.0\\lwjgl_util-2.9.0.jar;%APPDATA%\\.minecraft\\versions\\1.6.2\\1.6.2.jar\" net.minecraft.client.main.Main --username playername --session token:****:**** --version 1.6.2 --gameDir \"%APPDATA%\\.minecraft\" --assetsDir \"%APPDATA%\\.minecraft\\assets\"";

            Process p=Runtime.getRuntime().exec(authCode, null, new File("C:\\Program Files\\Java\\jre7\\bin")); 
            BufferedReader reader=new BufferedReader(new InputStreamReader(p.getInputStream())); 
            String line=reader.readLine(); 

            catch(IOException e1) {} 
            catch(InterruptedException e2) {} 


When it gets issued and I start the .jar, the jar just remains blank and Minecraft doesn't appear or anything.

Edited 3 Years Ago by CainKilgore

If someone knows how to help you they will. Unless, of course, you put them off with your bad manners. Your best hope is to post more useful details - like how can a jar remain blank?
In any case, I suggest you stop bumping.

Ps wasn't me who deleted your bumps.
Pps First thing to do is to fix lines 20/21. Never ignore exceptions when debugging.
Second, redirect the process error stream so you can read and display any errors.
Third, don't waitFor, because your process may be hanging, not terminating, so you never get to see the result streams, including any errors

Edited 3 Years Ago by JamesCherrill

Printing the stack trace in those two doesn't print anything, even after specifying .printStackTrace().

I just want to ask help from anyone of you guys about my program.

<snip> Do not hijack old forum threads by posting a new question as a reply to an old one

Edited 3 Years Ago by JamesCherrill: Do not hijack old forum threads by posting a new question as a reply to an old one

Hi Daniella

Please don't hijack other people's threads - start your own new thread for your question.

And before posting it, please review the DaniWeb Rules, especially "Do provide evidence of having done some work yourself if posting questions from school or work assignments". Show what you have done so far and someone will help.

Edited 3 Years Ago by JamesCherrill

This article has been dead for over six months. Start a new discussion instead.