Auto updater not working
<p>So I am trying to make an auto updater to the game that I'm making in java, but it doesn't work. With a lot of debugging I have found out that it is the part when it tries to start the game it stops. It promts nothing whats so ever. It won't work with you anyways because the IISC-server I'm running my "website" on is private and just for testing. source:</p>

<p>Downloader.java:</p>

<pre><code>import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;


public class Downloader {
    public static void DownloadFile(String Indir,String Outdir,String Inname,String Outname) throws MalformedURLException, IOException{
        InputStream Input = new URL(Indir+"/"+Inname).openStream();
        if(new File(Outdir+"/"+Outname).exists()){
            new File(Outdir+"/"+Outname).delete();
        }
        File f = new File(Outdir);
        f.mkdirs();
        OutputStream Output = new FileOutputStream(Outdir+"/"+Outname);
        Scanner scan = new Scanner(Input);
        while(scan.hasNext()){
            byte[] bytes = scan.nextLine().getBytes();
            Output.write(bytes, 0, bytes.length);
        }
        Input.close();
        Output.close();
    }
}
</code></pre>

<p>Launcher.java:</p>

<pre><code>import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;

import javax.swing.JOptionPane;



public class Launcher{
    private static final String dir = "http://tv-w7:8000/";

    public static void main(String[] args){ 
        new Launcher(args);
    }
    public Launcher(String[] args){
        if(args.length==1){if(args[0].equals("f")){
            try {
                    JOptionPane.showMessageDialog(null, "game is getting cleaned, press OK to proseed");
                    DownloadNewVersion(false,false);
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }else{
            try {

                Download();

            } catch (MalformedURLException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    public void Download() throws MalformedURLException, IOException{
        if(new File(System.getenv("APPDATA")+"/MS2-torsteinv/MS2-bin/no/torsteinv/MarsSettlement2/Client/Client.class").exists()){
            InputStream AVIS = new URL(dir+"MS2-dat/CD.txt").openStream();
            InputStream CVIS = new FileInputStream(System.getenv("APPDATA")+"/MS2-torsteinv/MS2-dat/CD.txt");

            Scanner CVS = new Scanner(CVIS);
            Scanner AVS = new Scanner(AVIS);

            String CV = CVS.nextLine();
            String AV = AVS.nextLine();

            CVIS.close();
            AVIS.close();

            if(!CV.equals(AV))DownloadNewVersion(true,true);
            else start();
        }else{
            DownloadNewVersion(true,false);
        }
    }
    private void DownloadNewVersion(boolean promt,boolean N) throws IOException {
        if(promt &amp;&amp; N)if(JOptionPane.showConfirmDialog(null,"A new verson is avalible. Download?")==1);
        InputStream OS = Runtime.getRuntime().exec("java -classpath "+System.getenv("APPDATA")+"\\MS2-torsteinv").getInputStream();
        Scanner s = new Scanner(OS);
        while(s.hasNext())System.out.println(s.nextLine());
        Scanner scan = new Scanner(new URL(dir+"MS2-register.txt").openStream());
        String CL = "";
        while(scan.hasNext()){
            CL = scan.nextLine();
            Downloader.DownloadFile(dir+CL.split(":")[0],System.getenv("APPDATA")+"/MS2-torsteinv/"+CL.split(":")[0],CL.split(":")[1],CL.split(":")[1]);
        }
        start();
    }
    private void start(){

        try {
            InputStream OS = Runtime.getRuntime().exec(new String[]{"java ",System.getenv("APPDATA")+"\\MS2-torsteinv\\MS2-bin\\no\\torsteinv\\MarsSettlement2\\Client\\Client.class"}).getErrorStream();
            Scanner s = new Scanner(OS);
            while(s.hasNext())System.out.println(s.nextLine());
        } catch (IOException e) {
            e.printStackTrace();
        }

        System.exit(0);
    }
}
</code></pre>

<p>i finaly got it to promt an error out:</p>

<pre><code>java.lang.ClassFormatError: Illegal UTF8 string in constant pool in class file Client
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Exception in thread "main" 
</code></pre>
