7

Is there an IDE which can run on Ubuntu that supports C, C++ and Java? I installed NetBeans, but it only supported Java. I installed the C/C++ package manually, but that package gives an error if I include iostream.

Is there any other IDE which can satisfy my needs? Or can I get NetBeans with all packages pre-installed in it?

edwinksl
  • 23,789
CH325
  • 130
  • 1
    "get NetBeans with all packages". How is this even a question? Their download page clearly shows a complete package (the right most download button) – Kevin Sep 27 '16 at 06:49
  • @Kevin The user's confusion appears clear to me. He asked the question because he didn't understand the aa packages option of Netbeans. He most likely thought he was configuring the IDE by specifically installing the CC++ development package (confusing this with the IDE support needed). Your comment might have been a sufficient answer to get him on his way with Netbeans. I provided him with an alternative to Netbeans (one I'm more familiar with), as the second part of his question. Of course, Eclipse comes in packages to and will need the CC++ support installed also. – L. D. James Nov 20 '17 at 14:31

5 Answers5

12

There's Eclipse available from the repository. You can install it with:

$ sudo apt install eclipse

Or by the GUI Search of the Ubuntu Software center. A search of the word "IDE" will bring up a significant number. You could also specify eclipse as the search criterion.

Eclipse will most likely have more of the familiar functionality and features you've used in Netbeans. It is a very powerful IDE and has support plugins for most of the popular programming languages.

The current version is available from the developers at: https://www.eclipse.org/downloads/

L. D. James
  • 25,036
  • 2
    +1 for eclipse though I would recommend installing the current version from the website http://www.eclipse.org/downloads/ – kalenpw Sep 26 '16 at 20:42
  • Installing Eclipse from the Software Centre is a very bad idea. – Luís de Sousa Oct 12 '16 at 08:48
  • Please notice that I gave the user the link to the latest eclipse. I replace most of the applications I use with sources from the developers. I don't suggest that to every user who is starting out, but this is something that I'm sure most people do for applications they link. I gave the tested repository as a starting point. In this case, the most recent version doesn't work with 16.04 without tweaking out the gtk bug. The tested repository works straight out of the box. It usually takes about a year to get the bugs out of the newest versions. – L. D. James Oct 12 '16 at 08:56
  • @LuísdeSousa I felt discussing the bugs and fixes in the answer might have been a distraction for a new user. – L. D. James Oct 12 '16 at 08:58
  • Eclipse Neon works out of the box on Ubuntu 16.04. Detailed install instructions can be found in this answer. – Luís de Sousa Oct 12 '16 at 11:53
  • @LuísdeSousa The thread you linked was an answer provided 3 years ago when the users were running openjdk-6-jdk. It's polished over the years as things develop. I give lots of support on eclipse.or to users. I've been helping them to deal with problems that happens when a new version is release (https://bugs.launchpad.net/ubuntu/+source/java-common/+bug/1552764/comments/16). At present most of the bugs have been resolved from Neon. But just as there was problems with the initial Neon release, there will be problems with the next. – L. D. James Oct 12 '16 at 12:12
  • I gave the users a number of alternatives including the latest version. He didn't ask for ecplise. He wanted a C++ compiler, which the single line sudo apt install eclipse provided. The other items I included for the OP included a search of the software center. Something that I consider valuable to new users. I didn't want to overwhelm the user too much with all the steps needed tar package install. His next question might have been how to deal with a tar. But again, I provided him with a link to the tar package that he could explore on his own if he likes eclipse. – L. D. James Oct 12 '16 at 12:17
  • By the way, if you read this full Q&A you might recognize the OP was having problems with Netbeans, which works on Ubuntu just as well as Eclipse (though not my choice). If I were going to go through the process of working with a tar install, I probably would have spent the time helping him with Netbeans. I tried to make easy for the OP. He also has other answers (of course including mine) that points to the latest version of Eclipse. By the way, having both the tarball version and the repo version installed isn't a conflict. – L. D. James Oct 12 '16 at 12:25
9

Netbeans supports all three. You just need to configure C/C++ toolchain for that.

Check the link for a details instruction: https://netbeans.org/community/releases/80/cpp-setup-instructions.html#compilers_linux

Anwar
  • 76,649
6

Have a go with Eclipse. It is a very popular and well-supported IDE.

It supports many languages, including C/C++ and Java: enter image description here

Just click the hyperlink at the top, and download & extract the archive to a directory of your choice. To launch it, simply CD into that directory, and do: ./eclipse

Note: The current release of Eclipse requires JDK >= 8


There's also Microsoft's Visual Studio Code:

enter image description here

It also supports C/C++ and Java.

  • 1
    Thanks for the valuable information. It sounds like Microsoft is starting to recognize/endorse Linux.! – L. D. James Sep 26 '16 at 17:59
  • @L.D.James - Notice how even the screenshot is from Ubuntu... – You'reAGitForNotUsingGit Sep 26 '16 at 18:03
  • 1
  • 1
    @EMBLEM The Lenovo gaffe was Microsoft's fault? – Honinbo Shusaku Sep 26 '16 at 18:28
  • @EMBLEM Visual Studio Code has been open sourced with an MIT licence and the code is available on github. The subject not being "Microsoft" but VS Code, I don't see how the other links are helpful in any way. – Shautieh Sep 27 '16 at 06:37
  • @Shautieh But the only binaries they provide are proprietary. The other links show that Microsoft very much opposes us. – EMBLEM Sep 27 '16 at 06:39
  • @EMBLEM https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source <- is this not good enough? I don't like Microsoft so much, and won't use Windows nor Office unless I really have to, but VS Code is one of the best editors (among open and closed source) available on Linux IMHO. I had been using Lighttable in the recent past, but as the project seemed dead I tested VS Code and was relieved to see it would be a good replacement. All the other editors I have tested were so-so (Code::Blocks, Netbeans) or just plain bad (Eclipse, Brackets, Atom, Geany, ...). – Shautieh Sep 27 '16 at 08:01
1

I do not know of one that supports all 3 languages, but Code Blocks is a great option for C/C++. Give it a try, it's very quick in my experience. You can write Java in Code Blocks...just not compile it.

  • How to install on Ubuntu? – CH325 Sep 26 '16 at 17:44
  • It has downloads available for linux, both 32-bit and 64-bit. Follow the proper link until you reach the ppa, which you can add to your software center in order to access the program. It's really quick and easy. http://www.codeblocks.org/downloads/26 – A. Bergeron Sep 26 '16 at 17:48
  • @CH325 You can install Code Blocks from the repository with: sudo apt install clodeblocks. It also has support for C, C++ and Java. – L. D. James Sep 26 '16 at 18:06
-1

In eclipse you can add support of all languages I tried it. But it is better to have separate eclipse for C++ and java thus your configuration won't interfere and you can use same shortcut and things will be similar.