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

running an app  RSS feed

 
Rick Rod
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After creating a program such as "hello world", I know I can run it in "cmd" but how can I run it out of the "cmd Prompt". I see the Class file but clicking on it will not let me run it alone. do I need another GUI up?
 
Sunny Kumar
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to run your program outside cmd ,then you will need to set up a GUI for it and pack your program in a JAR file.
Just google for creating a JAR file.
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main thing is: you must create a gui, which you can if you "master" AWT/SWING.

Your gui-classes won't start by clicking on it! Never click on classes.

If you want to start your application by clicking, you can do it
OR
by stuffing them in a jar etc

OR by making a batch-file ("name-of-class.bat in Windows")
with this entry:

java <name-of-class-with-main-in>
(or whatever you typed after the command-prompt...)

which is sometimes easier when your application is still in the testing-phase!Click on the batch-file.

Happy clicking!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!