Reputation: 63
I have a console based java minesweeper. How can i launch this on my desktop without opening it in my eclipse program and hit run? The program consists of a couple classes and there is an user input in the console. are there any standard methhods?
Tried this: export > executable jar file. that didn't work..
thank you!
Upvotes: 0
Views: 4016
Reputation:
Start+r "cmd" enter
java -version (if stuff pops up it's all good and you have java configured on your machine) java -jar "file\location\of\jar\file"
Upvotes: 0
Reputation: 323
The best method for executing your program outside of an ide is to export it as a runnable jar file.
However since your program sounds to be console based, it will run without showing anything.
The way to run the jar file is to go into a command line, find it, and run this:
java -jar myprogram.jar
This will show the output through the command line.
Upvotes: 3