Re: How to run my program?
Run it with Eclipse IDE !
Re: How to run my program?
um... i have eclipse ide...
Re: How to run my program?
In eclipse there should be a run button, it looks like a play button. However; you will need to write a main method which the compiler searches for before running anything.
Re: How to run my program?
I don't think you guys read my entire post, I HAVE run it with eclipse, and i HAVE compiled it into a .class file, I want to know HOW TO RUN IT without ECLIPSE. If you understand me now...
Re: How to run my program?
You mean through cmd? Or a clickable file? If you want a clickable file, you need to create a executable jar file, google can help you here. If you mean through cmd, open cmd, cd to file location and type "java filename" with no extension. If the file is HelloWorld.class, type
Re: How to run my program?
yes I want a clickable file. I searched on google and found nothing :(
Re: How to run my program?
Re: How to run my program?
Re: How to run my program?
Quote:
Originally Posted by
Iron Lion
Follow this guide. JAR's are Java's version of EXE's.
Re: How to run my program?
Eclipse can export your project into a .jar very quickly and easily.
To make a .jar:
1. Go File -> Export
2. In the export window, find Java and click the plus next to it.
3. Now select 'Runnable Jar' and click next
4. For launch configuration, select your project from the 'Launch configuration dropdown and make your export destination where you want your .jar file to be placed
5. Make sure 'Extract required libraries' is selected and click Finish (if you get a warning just click ok)