Hello all,

I have written a small 2d java game using the slick2d library. I have gone on to write a piece of code which the user would download and execute to install/run the game. The installation of the game works fine, however because the game is graphical not command line, when I call:

Java Code:
Runtime.getRuntime().exec("java -jar " + "C:/Documents and Settings/" + System.getProperty("user.name") + "/Application Data/KAPUT/KAPUT Windows.jar");
I don't see the program running. Here is my complete code:

Java Code:
package com.ncom.launcher.src;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;

import org.newdawn.slick.SlickException;

public class Main {
	public static String os = System.getProperty("os.name");
	public static void main(String args[]) throws SlickException {
		init();
	}
	public static boolean isMac() {
		return os.startsWith("Mac");
	}
	public static boolean isWindows() {
		return os.startsWith("Windows");
	}
	public static void copyFile(File sourceFile, File destFile) throws IOException {
	    if(!destFile.exists()) {
	        destFile.createNewFile();
	    }

	    FileChannel source = null;
	    FileChannel destination = null;

	    try {
	        source = new FileInputStream(sourceFile).getChannel();
	        destination = new FileOutputStream(destFile).getChannel();
	        destination.transferFrom(source, 0, source.size());
	    }
	    finally {
	        if(source != null) {
	            source.close();
	        }
	        if(destination != null) {
	            destination.close();
	        }
	    }
	}
	public static void init() {
		if (isMac()) {
			File f = new File(System.getProperty("user.home") + "/Library/Application Support/KAPUT/");
			if (!f.exists()) {
				f.mkdirs();
				try {
					copyFile(new File("export/KAPUT Mac.jar"), new File(System.getProperty("user.home") + "/Library/Application Support/KAPUT/KAPUT Mac.jar"));
					Runtime.getRuntime().exec("java -jar " + System.getProperty("user.home") + "/Library/Application Support/KAPUT/KAPUT Mac.jar");
					
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			else {
				try {
					Runtime.getRuntime().exec("java -jar " + System.getProperty("user.home") + "/Library/Application Support/KAPUT/KAPUT Mac.jar");
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		else if (isWindows()) {
			File f = new File("C:/Documents and Settings/" + System.getProperty("user.name") + "/Application Data/KAPUT/");
			if (!f.exists()) {
				f.mkdirs();
				try {
					copyFile(new File("export/KAPUT Windows.jar"), new File(System.getProperty("user.home") + "/Library/Application Support/KAPUT/KAPUT Windows.jar"));
					Runtime.getRuntime().exec("java -jar " + "C:/Documents and Settings/" + System.getProperty("user.name") + "/Application Data/KAPUT/KAPUT Windows.jar");
					
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			else {
				try {
					Runtime.getRuntime().exec("java -jar " + "C:/Documents and Settings/" + System.getProperty("user.name") + "/Application Data/KAPUT/KAPUT Windows.jar");
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}
}
I am on a Mac by the way.