How to make a program into a working .jar? (eclipse)
I am new to these forums, I've been looking for an answer to this question for awhile so hopefully someone can help me out.
I am relatively new to programming, I know my way around but have a lot to learn. I wrote a program the past two days to help me study my AP Chem terms so I can memorize them. The program is now fully functional and runs in Eclipse when i hit run. My question is how can i make my program run OUTSIDE of eclipse? I want to be able to make a .jar (or whatever is best) so that i can double click it and open it up. I assume it would have to use a command prompt or something (the program is ALL text, no jframes or anything like that) When I try to export it as a .jar file and run it, it shows up saying it failed to load the main class manifest and can't start. How can I make the program work? again all i want is to open a command prompt or something like that that displays text and allows user input of text. Hopefully you all understand what I am asking (It's difficult to describe). Please respond with your thoughts. Thanks again!
Re: How to make a program into a working .jar? (eclipse)
In Eclipse, instead of export as a jar there should be an export option to export as an executable jar - this will configure the manifest file with the appropriate main class. For a look at how this works if you wish to do this without an IDE, see Running JAR-Packaged Software (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)