Jump to content
  • 0

Launcher disappears after "Checking launcher version"


tepidpond

Question

Launcher Version: 1.0.1.0

Operating System: Windows 7 Professional SP1 x64

Java Version: Java 6u24 x64, same applies to 7u6 x64 and presumably 32-bit as well.

Antivirus Program: Microsoft Security Essentials

Description of Problem:

If you have this problem, skip to the bottom. If you're a dev, please read on.

Launcher does not properly escape the filepath of technic-launcher.jar. Users who have a space in their username cannot use TechnicLauncher.exe to start Minecraft and must manually run technic-launcher.jar or miss out on the fun.

To determine this use SysInternals Process Monitor from Microsoft TechNet (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) and use the right-click menu to include TechnicLauncher.exe. Clear the log, then from a user account containing a space launch TechnicLauncher.exe. ProcMon should now contain about 6500 log entries. From the bottom of the log page up once or twice and look for an entry labeled "Process Create"; and "C:\Program Files\Java\jre6\bin\java.exe" (If you see a full page of "ReadFile" and "C:\Users\username here\AppData\Roaming\.techniclauncher\technic-launcher.jar"; you're up too high and should scroll back down a little bit)

When double-clicked, the Process Create entry will contain the following:

Command line: "C:\Program Files\Java\jre6\bin\java.exe" -jar C:\Users\username here\AppData\Roaming\.techniclauncher\technic-launcher.jar


 

Copying and pasting that command line into a cmd window gets you the error message:


Unable to access jarfile C:\Users\username

To fix this, TechnicLauncher.exe needs to be patched to surround the path to technic-launcher.jar with quotes, just as it already properly quotes the path to java.exe.

Note: I've verified this with two identical brand-new user accounts "Test" and "Test 2" and calling "runas /user:Test TechnicLauncher.exe" and "runas /user:"Test 2" TechnicLauncher.exe". "Test 2" exhibits the problem, "Test" brings up launcher window exactly as it should.

Work-around if you have this problem:

You must create a new Windows user whose name contains NO SPACES, and only use TechnicLauncher from that username.

Error Messages:

Unable to access jarfile C:\Users\username

Error Log:

No logs as technic-launcher.jar never actually gets loaded.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

You seem to be fairly intelligent. You only need one version of java (which the recommended version is still java 7), and you need to read the COMMON PROBLEMS AND SOLUTIONS thread.

Actually I believe (correct me someone if I am wrong) that you can have two types of Java (some people use more than one for various reasons) as long as you have the technical skills to tell the Launcher and other programs to pick and use only one. Again this is only something that I think I have heard so take with a grain of salt.

Also, very nice post :) Perhaps you could talk to one of the admins (red names and the devs of the pack) to see if this is indeed as easy as adding quotes. If so they may (repeat) may, patch/fix this.

Link to comment
Share on other sites

  • 0

You seem to be fairly intelligent. You only need one version of java (which the recommended version is still java 7), and you need to read the COMMON PROBLEMS AND SOLUTIONS thread.

I've read the thread. I've performed my tests with each of JDK7u6, JDK6u24, JRE7u6, JRE6u24 as the only installed Java. The version of the JRE is absolutely irrelevant to this issue, and that thread lists nothing about spaces in the username.

And I'll test the possibility of multiple Java versions working shortly, I very strongly suspect that this is folklorish knowledge and not a problem whatsoever.

Link to comment
Share on other sites

  • 0

I've read the thread. I've performed my tests with each of JDK7u6, JDK6u24, JRE7u6, JRE6u24 as the only installed Java. The version of the JRE is absolutely irrelevant to this issue, and that thread lists nothing about spaces in the username.

And I'll test the possibility of multiple Java versions working shortly, I very strongly suspect that this is folklorish knowledge and not a problem whatsoever.

It is very possible that you have discovered a new issue my friend. I have never heard of any issues relating to the username before but spaces in them are pretty uncommon. Just a shot in the dark but could it be something to do with migrated accounts?

Link to comment
Share on other sites

  • 0

It is very possible that you have discovered a new issue my friend. I have never heard of any issues relating to the username before but spaces in them are pretty uncommon. Just a shot in the dark but could it be something to do with migrated accounts?

Unlikely. Each of the accounts I tested this from were brand new and had no migration performed or any configuration changes apart from installing Java. I'm nearly certain that this issue explains the vast majority of the "Launcher vanishes" problem reports.

Link to comment
Share on other sites

  • 0

My computer now has all of the following Javas installed:

32-bit:

JDK 7u7

JRE 7u7

 

64-bit:

JRE 6u24

JDK 7u7

JRE 7u7


Installed them in the order of jre6, jdk7x32, jre7x32, jdk7x64, jre7x64.

 

Running TechnicLauncher.exe from my normal account now results in a vanishing launcher as usual. But


runas /user:"Test" TechnicLauncher.exe


 

still gives the full launcher window opening and allows me to play the Technic pack. Multiple Javas is absolutely a complete non-issue. Also, for the technical-minded, Java is not in my path and JAVA_HOME is not set, so those are not necessary. I believe the launcher simply chooses the most recently installed 64-bit (or 32-bit on 32-bit systems) JRE that is available.

 

Further to the point, this is instructive:


    public static void RunLauncher(string launcherPath)

    {

      string path1 = Program.GetJavaInstallationPath() ?? Program.LocateJavaFromPath() ?? Program.LocateJavaPath() ?? Program.LocateJavaFromProgramFiles();

      if (path1 == null)

      {

        int num = (int) MessageBox.Show("Can't find java directory.");

      }

      else

        Process.Start(new ProcessStartInfo()

        {

          CreateNoWindow = true,

          WorkingDirectory = Application.StartupPath,

          FileName = Path.Combine(path1, "bin\\java.exe"),

          Arguments = string.Format("-jar {0}", (object) launcherPath),

          UseShellExecute = false

        });

      Application.Exit();

    }

I've now decompiled and patched TechnicLauncher.exe to surround the path to technic-launcher.jar with quotes. It successfully loads the launcher on my computer with all five Javas installed, and a username with spaces in it. Are there any rules against sharing this patched version?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...