Hi all,

If I write a java program inside of eclipse, how can I run that program outside of it, rather than just hitting the run button in eclipse. So, I can give others the program to run on their computers. Thanks!

Edited 5 Years Ago by javaNooblet: n/a

you mean as an .exe file or .jar file. if that is what you are talking about there is a way to do that or if not you can compile your program to .class that way someone can run it on their computer too.

For example I write a simple calculator program in eclipse on my laptop. Then I want to be able to run the calculator program on my desktop(without having the code in a compiler).

What is the difference between a .jar and .class?

Edited 5 Years Ago by javaNooblet: n/a

a .class file is a compiled .java file
if you want to run this, you'll have to open the command prompt and go
<path> java classname

if on the other hand you have a java file, which is an archive executable file, you can run it by just clicking on it.

This question has already been answered. Start a new discussion instead.