I created a code and a executable file so that I can run it without Eclipse. However when I double click on the java executable file, nothing happens. How can I fix this? Here is the code if anyone is wondering. I know it looks dirty im very sorry. It runs perfectly though
import java.util.Scanner;
public class work {
public static void main(String[]args) {
Scanner cin = new Scanner(System.in);
int loop = 0;
System.out.println("How to use: \n>>only use whole numbers for orginial price\n>>enter percentages in decimales "
+ "ie: .025 is 2.5%\n>>press 1 to reset percentages\n\n");
while (!(1==2)) {
System.out.println("What is the cash percentage?");
double cashP = cin.nextDouble();
System.out.println("What is the credit percentage (onto the cash)?");
double creditP = cin.nextDouble();
System.out.println("\n\n\n\n\n\n\n=========================\n>>>Everything is ready<<<");
loop = 1;
while (!(loop==0)) {
System.out.println("=========================\nWhat is orginial price?");
int og = cin.nextInt();
int omg = (int) ((og*cashP)+og);
int omg2 = (int) ((omg*creditP)+omg);
System.out.println("CASH: $"+omg+"\nCREDIT: $"+omg2);
if (og==1) {
loop = 0;System.out.println("\n\n\n\n\n\n\n=============================================\n>>>Cash and Credit percent"
+ "age areresetted<<<\n=============================================");}
}
}
}
}
EDIT : my problem has been solved