简体   繁体   中英

How to run as .jar in eclipse

I have been programming for about 6 months now, and I have just started using eclipse to export jar files (I was using cmd before). I know that you can use the export function to export to a jar , but I am wondering if there is a way to make eclipse do that automatically when I click the Run button. I have done some googleing , and it looks like I need to use either the Run Configuration , or the External Tools , but I have not found any step-by-step instructions or examples on how to set it up to export to a jar and then run it, and I am too much of a noob (not a n00b, there is a difference) still to be able to figure it out on my own. An example would be nice, and step-by-step would be better, but I will try not to be picky.Thank you for your patience.

Since you already used the command line, you can enter the same configuration in the External Tool Configuration (using the dropdown arrow). Double click on Program on the left side to create a new configuration. Then you simply need to provide the working directory and the arguments.

This page gives an example with pictures : http://developer4life.blogspot.be/2012/08/save-time-with-eclipse-external-tools.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM