I was able to compile a program into a jar file, it only has one class. I had to make a batch file so that I could run the jar without having to use the console directly. The code i used there was java -cp game.jar game
This allowed me to run the program on my computer with running the batch file. But, when i send the jar and batch file to a friend so he could run it, the console just flashes. I made him install a JRE because I guessed that could have been the problem, but it didn't fix it. My program code is `
public class game {
public static void main(String[] args)
{
// TODO Auto-generated method stub
System.out.println("+------------------------------------------------+");
System.out.println("|___ ___ ___ __ ___ __ |");
System.out.println("| | |__| |__ | |__ / _` |__ |\\ | | \\ |");
System.out.println("| | | | |___ |___ |___ \\__> |___ | \\| |__/ |");
System.out.println("| |");
System.out.println("|Made by Noah Baker |");
System.out.println("| *Pre-Alpha* |");
System.out.println("+------------------------------------------------+");
try {
Thread.sleep(5000);
} catch (InterruptedException ie) {
}
System.out.println("+------------------------------------------------+");
System.out.println("|There once was a fabled legendary item that if |");
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.out.println("|placed into the wrong hands could reek havoc. |");
try {
Thread.sleep(2000);
} catch (InterruptedException ie) {
}
System.out.println("|This item could destroy the very fabric of |");
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.out.println("|of space and time unless... |");
try {
Thread.sleep(2000);
} catch (InterruptedException ie) {
}
System.out.println("|unless... |");
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.out.println("Okay. I'm done with this.");
try {
Thread.sleep(2000);
}
catch (InterruptedException ie)
{
}
System.out.println("This \"game\" is nothing even close to one.");
try {
Thread.sleep(4000);
}
catch (InterruptedException ie)
{
}
System.out.println("Dana, you mean more to me than any game or thing could ever come close to.");
try {
Thread.sleep(3000);
}
catch (InterruptedException ie)
{
}
System.out.println("You are so absoulutely amazing and I am so incredibly lucky to be able to have");
System.out.println("had you as mine for the past 3 months.");
try {
Thread.sleep(5000);
}
catch (InterruptedException ie)
{
}
System.out.println("The past three months have been some of the greatest.");
try {
Thread.sleep(3000);
}
catch (InterruptedException ie)
{
}
System.out.println("I just have one question to ask you.");
try {
Thread.sleep(3000);
}
catch (InterruptedException ie)
{
}
System.out.println("Do you want to go to Homecoming with me?");
System.out.println(" ****** ******");
System.out.println(" ********** ********** ");
System.out.println(" ************* *************");
System.out.println("*****************************");
System.out.println("*****************************");
System.out.println("*****************************");
System.out.println(" ***************************");
System.out.println(" ***********************");
System.out.println(" *******************");
System.out.println(" *************** ");
System.out.println(" *********** ");
System.out.println(" ******* ");
System.out.println(" *** ");
System.out.println(" * ");
try {
Thread.sleep(6000);
}
catch (InterruptedException ie)
{
}
}
{