Eclipse Export [message #774016] |
Tue, 03 January 2012 00:02  |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
I want to export this program as a single runnable file to email to a friend. How would you go about doing this?
Code:
import java.util.Scanner;
public class Addition {
public static void main(String[] args) {
System.out.println("Welcome To The Addition Calculator");
System.out.println("Please Type The First Number:");
Scanner scan = new Scanner(System.in);
double num1 = scan.nextDouble();
System.out.println("Please Type The Second Number:");
double num2 = scan.nextDouble();
double num3 = num1 + num2; //you could use int instead of double
System.out.println("The Anwser Is: " + num3);
}
}
|
|
|
|
|
|
Re: Eclipse Export [message #776523 is a reply to message #775500] |
Sun, 08 January 2012 12:13  |
Eclipse User |
|
|
|
when i code a gui program and export it as a jar file it runs fine but when it's a program the runs in the command prompt it wont work but i know you can make a batch file in the same folder as the class (or the .java file i forget witch one it is) file and type: java "the name of the file" it will run but you half to have the java development kit installed. is there any way to run it w/o the java dev kit installed?
Thanks,
Zach
|
|
|
Powered by
FUDForum. Page generated in 0.08479 seconds