Related
I want to use emacs for java coding, but I'm confused on what mode to use for java coding. There's jdee, which seems ide-like; malabar, who is said to be more well versed in java 1.5 constructs than jdee; and emacs-eclim, which is an eclipse backend for emacs. There are also a wealth of completion extensions for emacs, and I'm also confused on which one to use. In fact, I'm so confused that I deferred using any of them until I get recommendations.
What is the current best option for java-mode + completion in emacs? And, if ever I decide to use a combination of what I mentioned above, will conflicts happen?
For those used to the power of Emacs text manipulation then Eclipse can seem like pedaling a bicycle with one foot. The Emacs+ plugin from http://www.mulgasoft.com/ is excellent for getting Emacs key bindings into Eclipse.
I use both Eclipse and Emacs a lot, but if I only did Java development I might use only Eclipse with Emacs+. It takes some work to get many Eclipse features enabled on Emacs.
My advice is to use Emacs >= 23. If you are on a Mac, look at AquaMacs. I use JDEE as the Java plugin. This has the serious drawback of not playing well with generics. It's not that it stops working, it's just that a lot of stuff isn't recognized. Do not use the old 2.3.5 JDEE plugin (that comes with most Linux distributions), but get the 2.4 version from the sourceforge site. Also get the Emacs Code Browser (ECB); this is a plugin that will give you stuff like Eclipse's Project Explorer and Outline views (other developers will look at this and not believe you when tell them that it's Emacs). I've used this setup for commercial projects on Windows, Mac, and Linux in the past year.
In fact, Eclipse plays pretty well with Emacs and I often switch between the two. Eclipse has some nice refactoring tools that I used to use sed for, and it has a good debugger interface. You can use them simultaneously. I find that I use Eclipse when working with other people's code and Emacs when I am writing my own code---Emacs is that much faster. Note that for me, a lot of the value of Emacs is the non-Java functionality, like editing Tomcat configuration files on remote servers from my local Emacs, writing professional documents with LaTeX, developing in Python or Bash or MATLAB or XML, and the odd text manipulation task (e.g., converting CVS files into String[] arrays).
I haven't used the other two projects you mention. It is possible to use the Eclipse compiler with Emacs already, so I'm not sure I see the point of the emacs-eclim project, which seems to be moribund anyway. The Malabar project might be interesting, but seems to be the product of one somewhat cranky developer (e.g., the warning "if you're not using Maven (why?) you should not consider malabar-mode"---I'll tell my clients that?).
Java on Emacs is in a sad state. I wish for JDEE to be revitalized, but it's not clear when or if that will happen. The web site and mailing list offer few clues.
I use emacs-eclim with auto-complete-mode support and java-mode highlighting exclusively for Java programming. 90% of my work is done in emacs, but I switch to eclipse when I need to debug, run unit tests or do major refactorings. All in all, this setup works very well for me.
I haven't tried JDEE for years, but I remember it was a b*tch to set up. I didn't care for the UI very much, as it put up lots of prearranged windows that were locked in place. I like to be able to switch back and forth between editing buffers, often showing just one window, but splitting and rearranging on the fly when it becomes necessary.
Note: I am an emacs-eclim maintainer, and this has probably coloured my judgement.
If you're using Maven, then I'd recommend malabar-mode. It will set everything up for you automagically, no need for editing project files like you'd have to do with JDEE. The downside I've found with malabar, is that it can consume a lot of memory if you've got a lot of multi level module projects open.
Both Malabar and JDEE will give you "true" completion, i.e. only completions that are possible. However, there are two amazing "intelligent guessing completion frameworks" in Emacs. hippie-expand and auto-complete.
The former is great (can complete whole code blocks for you, making it possible to e.g. cycle through all if-tests in your projects), but auto-complete mode is even better. It'll give you a nice intelli sense style menu, will "learn" as you use it, and allows you to define a file with the completions you'd like to be available in the various languages.
I'm taking a Java course where I have to do some development for Greenfoot. I'm very accustomed to using vim for development in C / C++ and so have been using Intellij Idea with a vim plugin.
I despise the Greenfoot IDE.
Is it possible to use Intellij to develop for Greenfoot?
As you've found already you can add libraries and mess around to get some bits working, but it's not officially supported (so might change from release to release or break) and most likely never will be. It's more by accident than design that it works at all this way.
I've often wanted to use a professional IDE for doing Greenfoot work myself, but the simple answer is that Greenfoot is primarily focused for beginners, for a fun and interactive way of teaching Java to people who have never programmed previously. The developers could potentially focus their time in providing official support for coding in other IDE's, but the amount of work required means it's pretty much been decided it's not worth doing.
If you haven't noticed already, Greenfoot 2 is now out with a much improved editor that supports basic code completion and intelli-sense. It's still of course nowhere near the IntelliJ editor, nor will it ever be, but it certainly makes developing in it more tolerable if you're used to something more advanced.
I use IntelliJ and I do not think it would be supported, but I am not certain.
This site has a similar question
I was able to go into the Project Structure, dependencies tab, select add module library and do attach classes selecting the /lib/greenfoot/standalone directory. This allows me to compile the balloons scenario cleanly. However, to actually run the scenario's you still have to use the Greenfoot environment due to all the games it plays behind the scenes.
This link is about Greenfoot in Eclipse, but the steps also seem to work with IntelliJ.
Basically you add bluejcore.jar and greenfoot.jar (found in your installation directory of Greenfoot) as your project libraries and create a properties file (details in the link) for Greenfoot. Finally select GreenfootScenarioMain as main class, this allows you to launch Greenfoot programs from within IntelliJ.
I used Eclipse with the Android SDK to develop the original application. I ask since this was my first Java (and Eclipse, and Android, and XML) project. I assume that most of the Java should run on the PC without too much trouble. I may want to restructure the code to isolate the Android specific functions. Should I stay with Eclipse or move to something like NetBeans? Any advice would be terrific.
Eclipse vs Netbeans is irrelevant to your problem. They are both just glorified text editors that let you edit java code, with a little bit of compilation help. You can write any java app in either, its really just personal preference.
The ease of porting to windows really depends on what your application is. If you have a large chunk of code that is not dependent on any of the UI or lifecycle stuff, then you should be able to create a separate java library for that and reference it in both your android app, and your windows app.
The challange will be replacing the UI. As Fredley mentioned, swing is the built in option. Its a bit of a pain, but you should be able to find plenty of documentation on it.
If your application is tightly tied to the UI, then you are going to have a very hard time finding any code in common.
Assuming that most of your code is in Android-independant classes, your biggest hurdle will be the GUI. Investigate swing to start off with.
The choice between NetBeans and Eclipse is largely one of preference. NetBeans has some nice GUI tools- but so does Eclipse. In my opinion, it's usually best to stay with what you know.
Here's a decent post on the subject of Java IDEs: What is the best free IDE for Java Programming
Is there any way to manage/debug/compile Java projects in Visual Studio 2010?
Before you answer, please read this topic.
I'm a little late to the party, but it looks like someone has started adding support. From the description, right now it only does syntax highlighting and basic navigation within a single file. However, in the Q&A section the author mentions plans to add compilation and debugging support later in the year.
The short answer - No.
The long answer - No, because the supposed intellisense support for Java that the blog entry referred to, in the question, relies on J# support. I believe it has been quite sometime since Microsoft has discontinued J# - VS2008 does not have it.
In the long run, you're better off learning how to use Eclipse/Netbeans/IntelliJ IDEA or any other IDE for the purpose of managing Java projects.
Sure. Visual Studio works with any language so long as someone takes the time to write the plug-ins for it. Heck, Mainsoft has already added JVM debugging support to Visual Studio. They just don't support the language.
The only problem is YOU are going to have to be the one who writes it.
I won't lie to you. It won't be easy and fan-boys on both sides will hate you for it. But if you pull it off I can at least offer you some money to write about how you did it.
No, although, I long for the day when VS might possibly support building Java applications. I don't think I have yet found an IDE as fully featured. Personally, if VS supported Java development, then I would trash my installation of Eclipse and Netbeans. ... so tired of wonky Java IDEs....
Cyberduck is written in Java and developed in Visual Studio 2010, though it requires IKVM, an implementation of Java for Mono and the Microsoft .NET Framework. Here are the build instructions.
C++ syntax highlighting looks pretty good for Java. Turn this on in Options->Text Editor->File Extension.
Extension: java
Editor: Microsoft Visual C++
Now reopen a .java file and see pretty colors.
I will advise to go for Eclipse, if you have to do at least 25% Java coding. Otherwise VS is good as well. But I like Eclipse for C++ as well as Java.
A new plugin is currently being developed named IntegraStudio,
aiming at full Java development under VS. It currently supports:
IntelliSense for Java (comparable to standard C++ IntelliSense in VS)
build with Ant or Maven
direct Ant / Maven project view in Solution Explorer
Java debugger with container visualization
support for VS browsing features (Class View, Code definition, etc.)
Class View works also for classes in JARs (including standard library)
browsing Maven repositories
JDK: 1.6 - 1.8
It uses standard JDK tools and targets the real Java platform (it
is not a .NET platform solution, as VJ# was).
At the moment of writing this, the IntegraStudio plugin is beta.
It does not yet contain advanced Eclipse features, however many
of them are in current roadmap (e.g. code refactorings and quick fixes).
You can find it on Visual Studio gallery:
http://visualstudiogallery.msdn.microsoft.com/588fb167-d18c-4e61-8aeb-30baeddb00da
The product official website is:
http://www.softerg.com/integra
Current docs (with large number of screenshots):
http://www.softerg.com/integra/docs/pages/is_intro.htm
Hey all, my Computational Science course this semester is entirely in Java. I was wondering if there was a good/preferred set of tools to use in ubuntu. Currently I use gedit with a terminal running in the bottom, but I'd like an API browser.
I've considered Eclipse, but it seems to bloated and unfriendly for quick programs.
Java editing tends to go one of two ways; people either stick with a simple editor and use a terminal to compile/run their programs, or they use a big IDE with a zillion features.
I usually go the simple route and just use a plain text editor and terminal, but there's still a lot to be said for IDEs. This is especially true when learning the language, since hitting "spam." brings up a dropdown with all of the fields and methods of the spam object. And this is not just useful to a beginner; it remains useful later on when using unfamiliar libraries and third party modules.
IDEs also have useful tools such as GUI builders which become invaluable when doing professional Java work. So although I typically prefer a simple editor/terminal combo, I highly recommend trying out an IDE such as Eclipse or Netbeans to see how you like it and so that you'll know how to use one later on.
Eclipse may be bloated for learning needs, but will probably give you the best overall Java experience. Try working through some of the built-in tutorials if you find the interface confusing.
I too vouch for eclipse (or IDEA if you have the money, actually IDEA is better than eclipse by a small margin).
But, make sure that you know how to compile and debug without an IDE first, and also learn to read the compiler's warning/error messages - they are essential skills for developers that using an IDE can prevent you from learning.
Eclipse and NetBeans are both good options. If you don't mind paying a little, so is IntelliJ IDEA (an academic license costs $99).
As far as IDEs go, I've found Eclipse to be about the best you could ask for. If you are used to IDEs full of features like VS, it should be right up your alley, and it isn't particularly resource-hungry; the way it organizes your projects makes the whole thing pretty simple as well, and it's also good to have on your resume. If you're looking for a non-intrusive IDE, mostly intuitive and that does its job as a great assistant, go with Eclipse. Not to mention its customization options.
If, on the other side, you'd like a much more light IDE, textPad-style (why?), I'd recommend Geany; I've worked with it in the past and it's got all the basic features to get started with the language and not be overwhelmed with all the features that big IDEs can offer. But I'd still recommend to go with Eclipse as soon as you get used to the language and need the IDE to be more of an assistant.
Another vote for Eclipse. In particular, you should be able to install it from within Ubuntu, as there are packages for it in one of the repositories (I forget which one specifically, as I'm not at my Ubuntu machine right this minute). If you use the GUI package-management application under the "Admin" menu, you should be able to find Eclipse and related packages.
I'd actually just recommend Eclipse. It seems bloated at first, but once you get used to it, you can use it to develop code very very quickly (and thus it's an excellent choice for a quick bit of Java).
Features I like:
Control+1 for error fixing - it knows how to fix most compile errors - just highlight the error in the code (which will be underlined in red) and it will give you a list of suggestions. Control+1 selects the first suggestion, which is almost always correct.
You can use this error fixing feature to write code that uses methods you haven't written yet - the error fixing will create the method on the class/interface you called it on, with the correct parameters/name/visibility etc. Or, if theres a similarly named method with similar parameters, it will suggest you've spelt it wrong when you called it.
The refactoring tools are also supergreat - you can highlight a block of code to extract as a method, and it'll work out what variables need to be passed in, and what it should return (if anything). You can move variables between field and methods. You can change class/interface/variable names, and it will correct them only where it needs to (which beats a search and replace any day).
You really don't need to know many eclipse features to get the benefit of using it - and it'll dramatically speed up your coding. I wish I'd known how to use it at University.
Basically, I'd recommend Eclipse. The time saved coding will make up for having to click "yes" a couple times when you start a project..
I'm using NetBeans with success right now.
I usually just use vim, but i've actually found the IDE Geany quite intuitive with a lot of good features but not really overblown. Check it out.
EDIT: I don't think Geany is fit for enterprise-level programming, but for a quick program it's one of the better IDEs I've seen, especially if you've had bad experiences with NetBeans or Eclipse as I have.
As many others, I suggest you to use Eclipse. It works fine in linux and after a few days you will find it not so unfriendly.
Moreover, if you will start developing more complex programs in java, you already will be familiar with a standard, complete and open source IDE, which is also the foundation for many other professional IDE for other languages, like Adobe Flex Builder, Aptana Red Rails and so on.
There is an interactive "IDE" designed especially for learning: BlueJ at http://www.bluej.org/
While I generally agree that Eclipse, NetBeans, or one of the other IDEs can be very helpful, they are pretty heavyweight for a learning environment; and you can end up spending your time wrestling with the IDE instead of learning Java.
In my career I've also found some people that don't really understand what the IDE is doing for them; they are totally lost without it (see Voodoo Programming). I recommend you spend at least some of your time with a simple editor, like gedit or vim, and the command line javac compiler.
BlueJ is considered a good editor for Java, tough mostly aimed at beginners. It does not bloated as Eclipse, but contains many useful features. It is also an open source project, so you are welcome to give it a try.
In our working enviroment we have to use the free Oracle JDeveloper ... sigh .. at home I tend to use Eclipse more and I really like it
Netbeans is a heavy but good IDE. Netbeans always have many features you don't really need, but because it's made with the netbeans platform, you can always strip it down to the essentials !
If you don't like all the work, go with eclipse. It's a lighter IDE.
Geany is pretty handy, don't quite know how it is with programming Java, but with programming C and C++ it's a nice light weight IDE. (BE WARNED: Building big projects usally tend to fail in geany. Workaround: compile in Geany build in terminal)
Bryan