Clean and build an Eclipse java project with one click

会有一股神秘感。 提交于 2019-12-31 21:32:21

问题


Is it possible to clean and build a java project in Eclipse with one click? I don't want to go to Project -> clean -> OK and than to project menu 'Build project'


回答1:


If you need something more powerful than clean and deploy, I suggest to learn Ant build tool. http://ant.apache.org/

Just configure it for your project and prepare the build script, than configure the build script for the clean and build target. If you need, also to deploy it on your server (glassfish, weblogic or whatever you want). With Ant you can configure more situation (test, production..)




回答2:


In Project->Clean I select "Clean projects selected below", select my project(s) and check "Start a build immediately" with "Build only selected projects".

Then go to Window->Preferences->General->Keys, search "Build clean" and enter my own binding for this command. For example, Ctrl + D.

Then, when I press Ctrl + D and Enter I have clean and build.




回答3:


When you have

Project --> Build Automatically

checked, it will be automatically rebuilt after cleaning it.




回答4:


Select your project and goto menu bar:Select Windows then->Select Preferences then ->Select Keys then ->Select Build and Clean




回答5:


Just need to Ctrl + S then Build, it will be as good as new!



来源:https://stackoverflow.com/questions/13547055/clean-and-build-an-eclipse-java-project-with-one-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!