Link to home
Start Free TrialLog in
Avatar of oxygen_728
oxygen_728

asked on

JAVA: How do I set ECLIPSE to automatically create a JAR file for my application?

Greetings,

I have a medium-complexity project with a few applications within it.

I have successfully created a JAR file on my desktop that I can run with java -jar AppC.jar

I created the JAR by right clicking on my project and choosing to export.

I would like this to occur automatically everytime I build the project, so that I don't have to spend the time to go through the menus myself.

Note: My reason for doing this is because running the app from the eclipse IDE is worthless to me, I need the command line

Thanks for your time

Avatar of araim
araim
Flag of Poland image

I'd suggest writing an ant script that builds your project and creates a JAR from it.
you can then use this build script from eclipse.

more on ant:
http://ant.apache.org/
Avatar of oxygen_728
oxygen_728

ASKER

Can you recommend a good tutorial on how to set one up?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of ForceRs
ForceRs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, I'll get to that soon!
Avatar of CEHJ
If you're not committed to Eclipse, i'd recommend using Netbeans. It integrates completely with Ant and in fact does what you require by default anyway
I think that is wise advice CEHJ -- After using eclipse for two months, I'm starting to think that the only people who recommend it are the people who develop it.

I can say very few good things about it.

Well actually when i recommend N over E here i usually find myself in a minority of one ;-) Having used both, i find the main reason for preferring the former is actually the Ant thing.