开发者

Java programming environment : emacs or eclipse? [closed]

开发者 https://www.devze.com 2023-01-10 07:28 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I'm pretty new to Java, and I need to build up programming environments for it (editing, compiling, testing, debugging, and deploying/making jar files). And, even though I'm not a super expert of emacs, I'm a big fan of this wonderful tool.

Here comes my question.

Is it wise to use emacs for Java development? Is Eclipse better for Java 开发者_如何学Godevelopment?

And, what people normally use for Java development environment? I mean, using what tool may result in getting more help than otherwise?


As a die-hard Emacs user and professional Java developer, I can say that I choose Eclipse hands-down for Java, and Emacs for everything else. Every tool has its advantages, and I try lots of tools. But the ecosystem surrounding Eclipse is unparalleled (even by EmacsWiki!) and Eclipse has the best Emacs emulation of any editor I've ever found if you install the Emacs+ plugin (by MulgaSoft).

Depending on the type of Java programming you're doing, Eclipse has no competition, i.e. if you're working with anything related to Google technologies (GWT, App Engine, Android). The Mylyn component to Eclipse interfaces with just about every task management tool out there, which is fabulous if your work in a corporate environment that uses JIRA, Mingle, VersionOne, Bugzilla, etc.

My experiences with JDEE, while favorable and interesting, put in a distant 3rd place to Eclipse and Netbeans, respectively. I haven't really worked with IntelliJ, so I can't comment on that front.


I think it's pretty critical to understand that there is a hard, non-subjective line between "AST editors" (Eclipse/NetBeans/IntelliJ) and text editors like emacs, vi, slickedit, etc. etc.

In Eclipse/NetBeans/IntelliJ they compile all the code and read that byte code back into a large, fully connected and cached internal AST. So for example when you rename a method, they follow the AST to all code in the project that uses said method and update all usages.

This is significantly different than a text find/replace which is what you get from a text editor.

Java is a strongly typed language which is an incredible advantage when using an editor that knows how to follow and manipulate that type structure.


malabar-mode is the best existing solution for Java development in Emacs. It has nice maven integration, groovy shell, semantic support, etc...

Java IDE certainly outgun anything Emacs has to offer in terms of features related to refactoring and code analysis, but other than that the Emacs experience is way better - much more powerful editor, simpler and vast ecosystem of extensions and an overall aura of greatness ;-)

It's all a matter of taste in end - whether you prefer click-based programming, when everything happens in menu and popups or prefer to go down to the bare metal, write the code more carefully(because there won't be a tool to analyze it for you) and create...

If you go for IDEs do yourself a favor, ignore all the Eclipse propaganda and have a look at the competing projects - I personally recommend you IntelliJ IDEA. In the end one decides for himself, but the decision should be made objectively and not based on statements like "everyone is using Eclipse"...


Most of the Java developers I know use Eclipse. I prefer Emacs, and at times, NetBeans. Mostly I prefer to do all my editing in Emacs and use NetBeans only to generate the build file. I recommend NetBeans over Eclipse because it has a better Emacs mode and is lighter on resources (relatively!). If you are looking for a full Java IDE for Emacs, try JDEE.


Emacs is a fantastic editor which is very useful - when you take the time to learn it well.

Eclipse/NetBeans/IntelliJ are each a fantastic Java IDE which is very useful - when you take the time to learn it well.

The amount of additional functionality that is available in Eclipse because it knows by heart that you are working with Java code and understands that code, is so large that it is difficult to tell in a few sentences. Let me give a few examples:

  • Hovering the mouse over any identifier shows its javadoc in a popup.
  • A single keypress can let you choose any implementation of the interface at the cursor location, including sub-classes.
  • You can easily refactor things, i.e. change orders of parameters in a method call or rename it and Eclipse will change it in all files where it is used.
  • The builtin Eclipse compiler is very robust so even with errors elsewhere in your source, you can still refactor code giving you more freedom to work.

The list goes on and on. There are, however, plenty things that Eclipse is not very good at, and in those cases it can be beneficial to open the files in other editors, like Emacs or vim.

So, learn your tools well, and have more tools than just a hammer.


Ultimately, this comes down to what works best for you. Try emacs, IDE's, and other tools as you see fit and then use what you like and find easiest.

I have a co-worker who says he often has emacs and NetBeans up at the same time. He uses emacs for editing and NetBeans for investigating errors, building, testing, etc.

While I've dabbled off and on with Java for years, I'm just starting to get into it seriously due to a new job where it is the main development language. Previously, I've used emacs for most of my development; it's editing power is quite nice to have. However, for larger projects I find that for many things an IDE is nice also. So, I may adapt my co-worker's strategy of running both emacs and NetBeans simultaneously.

Prior to working on this job I'd worked a little with Eclipse, which I liked. However, NetBeans is the defacto standard where I'm now working, and has some good points, so I'm working on learning that.

Recently I learned of CEDET, which looks to be a way of wrapping an IDE around emacs. Unfortunately, I've not had time to investigate it yet, but you may find it worth a look.


I am using Netbeans but there are some limitations to it, like absence of a back-forward navigation in the tool-bar (am used to it), variable renaming in a class, not changing the caller methods etc. Eclipse seemed better to me.

Best would be to try using the community edition of Idea IntelliJ . I have used their premium edition, and must say the developer experience in terms of usability friendliness and refactoring help is much better in IntelliJ. Also, there are some really neat short cuts for example to show you all the child class of a particular class in one view (And then letting you choose which to open), refactoring help and lots more.

The community edition would also have most of the features.

0

精彩评论

暂无评论...
验证码 换一张
取 消