how to execute a runnable jar file in eclipse

Shadid Antagonist

just made a calculator type simple program....I need a way to compile it to ruanable jar...how do I do this in eclipse...I'm very new to programming so pardon me if I'm not very clear in my question...

here's my source code

   package lvlup;
   import java.awt.color.*;
   import java.math.*;
   import java.util.Scanner;


   public class methods {

    public methods(){
        System.out.println("Choose an option/n");
        System.out.println(" press 1 for derivative calculator (known polynomials)");

        int Choice;
        Scanner c = new Scanner(System.in);
        Choice = c.nextInt();

        switch (Choice){

        case 1:
            derCal();

        }

    }

    private void derCal() {
        double x;
        double n;
        long der;
        Scanner sc = new Scanner (System.in);

        System.out.println("welcome to the derivative calc");
        System.out.println("insert x");

        x = sc.nextDouble();

        System.out.println("insert n now/ n=1 default");

        n = sc.nextDouble();
        der = (long) (n*Math.pow(x, n-1));

        System.out.println("the answer is :" + der);

    }

    public static void main (String args []){methods m = new methods();

    }
   }
Juned Ahsan

To create a new runnable JAR file in the workbench:

  1. From the menu bar's File menu, select Export.
  2. Expand the Java node and select Runnable JAR file. Click Next.
  3. In the Opens the Runnable JAR export wizard Runnable JAR File Specification page, select a 'Java Application' launch configuration to use to create a runnable JAR.
  4. In the Export destination field, either type or click Browse to select a location for the JAR file.
  5. Select an appropriate library handling strategy.
  6. Optionally, you can also create an ANT script to quickly regenerate a previously created runnable JAR file.

source: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-37.htm

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to make the runnable jar file for a maven eclipse project with hibernate configuration

From Dev

Java eclipse error with exported runnable jar file

From Dev

How to Specify External log4j2 Config File in Runnable jar Created with Eclipse

From Dev

Eclipse export to runnable .jar

From Dev

Java project working on Eclipse but not working when exported to runnable jar file

From Dev

Eclipse Java9 Export Runnable JAR file

From Dev

How to execute a jar file within a jar file

From Dev

How do I create a runnable JAR in IntelliJ as I would in Eclipse

From Dev

how to make runnable jar for javaCV or openCV project from Eclipse

From Dev

Exported eclipse runnable .jar will not run

From Dev

OpenCV Exporting Runnable JAR in Eclipse

From Dev

Different behavior in JAR file vs Runnable JAR file exported from Eclipse

From Dev

How to distribute multimodule project as single runnable jar file?

From Dev

How can a runnable jar load external xml file at runtime?

From Dev

How to get resource files from the runnable jar file which are in buildpath

From Dev

How can I package a resource file into a runnable jar

From Dev

Export Runnable JAR file not working

From Dev

get the name of a runnable jar file

From Dev

Runnable JAR file not opening JFrame

From Dev

get the name of a runnable jar file

From Dev

Using Proguard with a runnable JAR file

From Dev

Getting warning message when trying to create a runnable jar file using eclipse

From Dev

How to execute jar file on double click

From Dev

How to execute the jar file from a java class

From Dev

Eclipse exported Runnable JAR not showing images

From Dev

Deploying a runnable jar in ECLIPSE by considering dependencies

From Dev

Eclipse: Create Runnable .jar WITH manifest possible?

From Dev

Exporting Runnable JAR in eclipse with User Libraries included

From Dev

How to use the content of a .jar file as project in Eclipse?

Related Related

  1. 1

    How to make the runnable jar file for a maven eclipse project with hibernate configuration

  2. 2

    Java eclipse error with exported runnable jar file

  3. 3

    How to Specify External log4j2 Config File in Runnable jar Created with Eclipse

  4. 4

    Eclipse export to runnable .jar

  5. 5

    Java project working on Eclipse but not working when exported to runnable jar file

  6. 6

    Eclipse Java9 Export Runnable JAR file

  7. 7

    How to execute a jar file within a jar file

  8. 8

    How do I create a runnable JAR in IntelliJ as I would in Eclipse

  9. 9

    how to make runnable jar for javaCV or openCV project from Eclipse

  10. 10

    Exported eclipse runnable .jar will not run

  11. 11

    OpenCV Exporting Runnable JAR in Eclipse

  12. 12

    Different behavior in JAR file vs Runnable JAR file exported from Eclipse

  13. 13

    How to distribute multimodule project as single runnable jar file?

  14. 14

    How can a runnable jar load external xml file at runtime?

  15. 15

    How to get resource files from the runnable jar file which are in buildpath

  16. 16

    How can I package a resource file into a runnable jar

  17. 17

    Export Runnable JAR file not working

  18. 18

    get the name of a runnable jar file

  19. 19

    Runnable JAR file not opening JFrame

  20. 20

    get the name of a runnable jar file

  21. 21

    Using Proguard with a runnable JAR file

  22. 22

    Getting warning message when trying to create a runnable jar file using eclipse

  23. 23

    How to execute jar file on double click

  24. 24

    How to execute the jar file from a java class

  25. 25

    Eclipse exported Runnable JAR not showing images

  26. 26

    Deploying a runnable jar in ECLIPSE by considering dependencies

  27. 27

    Eclipse: Create Runnable .jar WITH manifest possible?

  28. 28

    Exporting Runnable JAR in eclipse with User Libraries included

  29. 29

    How to use the content of a .jar file as project in Eclipse?

HotTag

Archive