Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Simple but important java question !!!?

Alright it's a simple question but i need an answer! I've made a calculator in java. When i run it, it opens a separate window like this ---->http://i.imgur.com/9G0T7.png

How do i make it into a run-able file that i can open from my desktop or send to friends? Should i make it into an exe file? if so, how???

4 Answers

Relevance
  • ?
    Lv 7
    9 years ago
    Favorite Answer

    Java programs are platform independent, so they don't compile into .exe files. Your best option is to use the "jar" command to create a Java Archive file. Your friends will still need to have Java installed on their computers but they will be able to double click and run the program. I've posted a link to the basics of using Jar files below.

  • 9 years ago

    If you're using Eclipse, you can export your app as an executable jar file. Then, if the user has java installed, clicking on the file will cause the java app to run.

  • 9 years ago

    You can use http://jsmooth.sourceforge.net/ to make your .jar into an .exe, although it would be just as simple to keep at as a .jar. The .jar can be ran with the command "java -jar *jar-name*.jar" or simply double-clicked if those who you are trying to send it to have everything properly set up.

    Source(s): Java Programmer
  • ?
    Lv 4
    4 years ago

    i think of of D is the magnificent answer by way of actuality this methodology as one that belongs to the whole type and not a element of any units of the class. the foremost significant might desire to continually be declared as static by way of actuality the interpreter makes use of this methodology interior the previous any units are created.

Still have questions? Get your answers by asking now.