Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Execute from desktop or program file  RSS feed

 
henry akoma
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
recently i wrote a calculator program. however i need to always compile and run from the command prompt which i find inconveniencing most times.

i want to be able to execute this program from my program file or desktop but i dont know how to go about it.
please can you guys help me cross this huddle.

i will very much appreciate all assistance given.
thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well there are a number of ways.

1. Write a .bat file that runs your usual DOS commands, then put the .bat on the desktop.

2. Jar up your files and in Windows you can associate a .jar file to run Java.

3. There are some products out there that .exe you files, but I think the other solutions are better.

4. Webstart, although that is a little different and more for distribution.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two post below at this time is asking the same question, and low and behold there, they had a link to our FAQ, questions 18 etc.

http://faq.javaranch.com/view?JavaBeginnersFaq

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!