63

Having dealt with yet another stupid eclipse problem, I want to try to get the lightest, most minimal Eclipse installation as possible.

To be clear, I use eclipse for two things:

  • Editing Java
  • Debugging Java

Everything else I do through Emacs/Zsh (editing JSP/XML/JS, file management, SVN check-in, etc). I have not found any aspect of working in Eclipse to do these tasks to be efficient or even reliable, so I do not want plug-ins that relate to it.

From the eclipse.org site, this is the lightest install of eclipse that they have, and I don't want any of those things (Bugzilla, Mylyn, CVS xml_ui), and have actually had problems with each of them even though I do not use them.

So what is the minimal build I can get that will:

  1. Ignore SVN metadata
  2. Includes the full-featured editor (intellisense and type-finding)
  3. Includes the full-featured debugger (standard Eclipse/JDK)

Does not have any extra plug-ins, platforms, or "integrations" with other platforms, specifically, I don't want to deal with plug-ins relating to:

Maven, JSP Validation, Javascript editing or validation, CVS or SVN, Mylyn, Spring or Hibernate "natures", app servers like a bundled Tomcat/GlassFish/etc, J2EE tools, or anything of the like.

I do primarily Spring/Hibernate/web-mvc apps, and have never dealt with an Eclipse plug-in that handles any of it gracefully, I can work effectively with my own toolset, but Eclipse extensions do nothing but get in the way.

I have worked with plain eclipse up to Ganymede, MyEclipse (up to 7.5), and the latest version of Spring-SourceTools, and find that they are all saddled with buggy useless plug-ins (though the combination is always different).

Switching to NetBeans/Intellij is not an option, and my teammates work with SVN-controlled .class/.project files, so it pretty much has to be Eclipse.

Does anyone have any good advice on how I can save a few grey hairs?

Lii
  • 11,553
  • 8
  • 64
  • 88
liam
  • 3,830
  • 6
  • 32
  • 31

10 Answers10

65

You can download the empty Eclipse platform and then manually install the JDT tools.

  1. Go to the The Eclipse Project Downloads page.
  2. Choose the bundle you want, probably Latest Release.
  3. On the download page of the chosen bundle:
    1. Download Platform Runtime Binary
    2. Download JDT Runtime Binary
  4. Extract the Platform Runtime Binary archive file and run it (for example, by double clicking on eclipse.exe).
  5. Install the JDT binary:
    1. Click Help → Install New Software → Add... → Archive.
    2. Choose the JDT zip file you downloaded.
    3. Uncheck Group Items by category.
    4. Select the Eclipse Java Development Tools.
    5. Click next to install and restart Eclipse when prompted.

JDT from the Eclipse update site

You can also install JDT from the Eclipse update site, instead of downloading the binary.

To do this, do this following:

  1. Skip downloading the JDT Runtime Binary, only download, extract and run the Platform Runtime Binary.
  2. Go to the Install New Software, but instead of Archive chose the Eclipse download site.
  3. Search and install Eclipse Java Development Tools.
Lii
  • 11,553
  • 8
  • 64
  • 88
Andrew Niefer
  • 4,279
  • 2
  • 19
  • 22
  • 2
    I just built myself a lean, mean Eclipse for XML editing only by downloading the Platform Runtime Binary and installing the XML tools using the in-app installation wizard. No more JDT, PDE, Myline, etc! I wanted this for a long time, so thanks! – otto.poellath Aug 25 '10 at 18:28
  • Latest download area seems to not have links to individual parts of Eclipse. – NateS May 09 '12 at 00:58
  • 1
    Another link which I found to be better organized: http://archive.eclipse.org/eclipse/downloads/ – Peter Zeller Oct 09 '14 at 22:17
  • until eclipse creates a tool that let you choose your packages, this is the best approach – Allan Vital Dec 11 '15 at 19:41
16

The "Eclipse IDE for Java Developers" version isn't the smallest one! Look for "Eclipse Classic" - it doesn't contain most of the things you mentioned. It's larger in download size only, because it comes with source code.

See this comparison: http://www.eclipse.org/downloads/compare.php

schnatterer
  • 7,525
  • 7
  • 61
  • 80
Chris Lercher
  • 37,264
  • 20
  • 99
  • 131
  • One big thing that Classic includes is PDE, which is the plug-in dev environment. Most Java developers don't develop Eclipse plugins. – Mark Peters Jun 07 '10 at 21:01
  • Yeah, I saw that on the downloads page, but didn't want to bite the bullet, but somehow missed this package comparison. PDE has never really gotten in my way, but I would still rather not have it. (and why is it _mandatory_ to get all the source in a bundle? why not a separate link of just the dist?) Thanks guys! – liam Jun 07 '10 at 21:18
  • You could try building your own: http://ondemand.yoxos.com/geteclipse/start (hint: use the Templates tab). I used this once a few years ago, and it worked fine - they did introduce some modification to the Eclipse update process though, which I didn't like. Maybe this is better now. – Chris Lercher Jun 07 '10 at 21:35
  • This one worked out of the box. I went with this solution and will try yoxos next time. Thanks for the help everyone! – liam Jun 10 '10 at 18:03
  • I just tested and a new workspace with "Hello world" application: For Java Developers 180MB Classic 120MB – Krzysztof Kot Oct 18 '11 at 19:09
11

You can use a thirdparty distribution builder like Yoxos and download just what you want.

ykaganovich
  • 14,736
  • 8
  • 59
  • 96
  • That looks good, I'm using the plain vanilla one suggested by chris_l , but next time eclipse decides to have a complete meltdown and nuke my workspace ill give this a shot! – liam Jun 10 '10 at 18:02
  • The main advantage of using Eclipse is the use of `local history`. If we employ an external editor then we lose this functionality. –  Aug 27 '12 at 14:41
8

A bit late to this party, but I asked myself the same question for a while, and while now I'm back to a more fully-fledged Eclipse installation, I used to to the following to streamline it a bit. Hope it helps.

What I Needed

Functionalities:

  • Java Support
  • Java + Java EE (XML) + Debug Perspectives

Pretty much it. There's a lot of other things I like to use in Eclipse, but I needed to keep it down to the skinniest possible because I was in a 3GB environment where I also needed to run other servers in parallel, so I couldn't afford much.

Resulting Perspectives:

  • Lightweight Java
  • Lightweight Browser (fairly tweaked for code reviews and code inspection - that one was actually heavier than the others)
  • Lightweight Debug

What I Did

  • Install Eclipse Java EE (install classic if not caring about the Java EE/XML bits)
  • disable hungry views
    • disable outline (when you need one, just do CTRL+O)
    • disable call and type hierarchies
  • disable decorators
  • disable menu entries (right-
  • disable toolbar items
    • even better: hide the toolbar
  • disable hovers and actions associated with that
  • disable spell-checking
  • disable XML validation
  • disable Mylyn
  • disable non-needed search forms in CTRL+H dialog (I usually actually only use the "File Search" mode, sometimes the "Java" one)
  • disable usage reporting
  • disable unnecessary plugins or features
  • disables perspectives and plugins loaded automatically on startup
  • restrict internal limits:
    • some views have a scope (enclosing class, project, working set, workspace...)
    • some views and UI elements have boundaries (console/loggers, highlighters, markers...)
  • tweak the eclipse.ini to:
    • -clean the workspace (slower, but I tend to prefer to do that)
    • use G1GC
    • reduce memory usage (I noticed that I can perfectly live with -xss128k and -xmx384 with G1, for instance. YMMV, of course, as always with JVM tuning.)
    • use a server VM (and point directly to the VM's DLL)

Also disable views you don't need in the "Debug" and "Code Browsing" perspectives.

Sorry, I had actually saved all of these as a set of 3 lightweight perspectives to re-import everytime on my new project, but I cannot get my hands on them at the moment. If I ever find then, I'll add a link to them here.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
haylem
  • 22,460
  • 3
  • 67
  • 96
  • 1
    thanks for the update. I would love if you could follow up with the configs or put them on github or something. – liam Apr 28 '12 at 02:13
  • Did you finally find the 3 lightweight perspectives? – Stephan Oct 27 '17 at 08:16
  • @Stephan: unfortunately, no. These were sadly lost during a job change. They shouldn't be too hard to create manually, but to be honest for the past 2-3 years I've tended to avoid Eclipse in favor of IntelliJ (for a number of reasons, and including because I don't need to come up with such workarounds to make it behave as intended and with it remaining responsive). Best of luck to recreate these if you attempt. – haylem Nov 21 '17 at 00:16
4

Instead of going for a ready package from Eclipse Downloads, from the same page go for the Eclipse Installer. Currently available for Mac, Windows & the beloved Linux. Launch the Installer which should update (or not if you are lucky enough :) ). Select "Eclipse Platform" which is the absolute minimum from this IDE, set your other installation preferences and install.

After the download/installation process, I'd suggest your head to Help->Install New Software and search for the Eclipse Marketplace (Yes, even that is not included in this package) just to make your life a bit easier.

Samih3
  • 184
  • 3
  • 9
3

Get as minimal an installation as you can, and then remove whatever is left that you don't want.

Longer answer:

I played around a bit. Here's how I experimented:

  1. Extract a clean eclipse*.zip to two different directories; call it eclipse and eclipse-bak. We'll only modify eclipse.
  2. Before starting it the first time, remove some of the features from the features folder. I got rid of org.eclipse.cvs, org.eclipse.epp.\*, ...mylyn\*, ...wst\*.
  3. Start up Eclipse to a workspace. Create in that workspace a Java project, debugging configuration, etc. Stuff that you would want to do and that will complain if we remove the wrong thing. Open up the Error Log view.
  4. Close Eclipse. Remove something (or a group of things) from the plugins folder.
  5. Open Eclipse. Check the error log to see if something you care about couldn't load. If it did, add those things back from eclipse-bak/plugins. If not, close Eclipse and return to step 4 for a new set of plugins.

Using this I got my configuration to still be able to edit and debug Java files, but including only these plugins:

com.ibm.icu*
org.apache.*
org.eclipse.compare*
org.eclipse.core*
org.eclipse.debug*
org.eclipse.draw2d*
org.eclipse.ecf*
org.eclipse.epp.package.java*
org.eclipse.equinox*
org.eclipse.help*
org.eclipse.jdt*
org.eclipse.jface*
org.eclipse.ltk*
org.eclipse.osgi*
org.eclipse.platform*
org.eclipse.rcp*
org.eclipse.search*
org.eclipse.team.core
org.eclipse.team.ui
org.eclipse.text
org.eclipse.ui*
org.eclipse.update*
org.hamcrest*
org.sat4j*

Most of that is core stuff, but you might be able to trim it down further. Notably gone are Mylyn, the usage collector, EMF, CVS, WST, even JUnit (though I think you should keep JUnit).

Lii
  • 11,553
  • 8
  • 64
  • 88
Mark Peters
  • 80,126
  • 17
  • 159
  • 190
  • That would be nice, but disabling and changing these features often doesn't work. For example (this)[http://stackoverflow.com/questions/261045/eclipse-3-4-ganymede-javascript-validation-issue] is an issue I am currently having, but even turning off all related features and removing what I can from the path, it still is suddenly throwing me a bunch of javascript errors after the last update, even though nothing has changed. This means a default feature that I don't want and have turned off is still preventing me from working. I want to know how to start off without any of that crap. – liam Jun 07 '10 at 20:14
  • You're right, I'm doing some experimentation now. I had assumed you could uninstall some of those things from within the app; looks like that assumption was wrong. Sorry for being premature! – Mark Peters Jun 07 '10 at 20:15
  • No problem, I've had so many little things like this happen to me that I think its just time to try to get the platform right, at least for me. I want to use eclipse for the things it does well, and not be bothered with their attempt to try to do everything in a java IDE. (for example: plain vanilla myeclipse's default behavior when you click the "debug" button is to try to debug a .java file as a javascript file. Nothing about that makes sense. Also, editing an xml file switches your keybindings back to standard, even if you set them to be globally emacs.) But I've tried the easy and obvious. – liam Jun 07 '10 at 20:23
  • after the edit: Wow, thanks for the effort! I forgot about junit, that is a good plug-in, and I definitely use it. I'm checking out the other options, but if I don't get anywhere with it I will definitely give this a shot. Thanks! – liam Jun 07 '10 at 21:16
1

I feel you man, when working with Eclipse, the application is constantly trying to help. Ignoring workspace corruptions, I spend my development time fighting all the "helpful" things Eclipse does. XML is not that hard to read, but it still confuses the shit out of me when I get the XML designer. All it does for me is add an extra manual step to click on the source tab. Every time a new version of eclipse comes out they redesign the front page and the distributions. At which time a new quest starts for finding a way to debloat Eclipse again. I have the same experience with extensions to Eclipse by third parties and avoid them if at all possible. WTP has somewhat usefull stuff, but overall I prefer a basic java eclipse.

It is a good idea start with the Platform Runtime Binary and add JDT. Manually extracting the JDT runtime doesn't seem to work for me these days, so it it better to use the update client. You can use the marketplace client, but personally I have always found it rather annoying. An alternative is to use the director. The director can install JDT without starting the GUI.

Here is a script that downloads eclipse Oxygen 4.7.3a and installs JDT unnattended:

#!/bin/sh

die() {
    echo >&2 "$@"
    exit 1
}

[ "$#" -eq 1 ] || die "exactly 1 argument required [INSTALL_DIR]"
[ -e "$1" ] && die "*warning* Aborting! location exists, eclipse already installed?"

INSTALL_DIR="$1"
TARBALL=eclipse-platform-4.7.3a-linux-gtk-x86_64.tar.gz

mkdir -p $INSTALL_DIR
if [ ! -f $TARBALL ]
then
    wget http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.7.3a-201803300640/$TARBALL
fi
tar -v -xf "$TARBALL" -C "$INSTALL_DIR" --strip 1

echo "\nUsing director to install java development tools, this may take a while..."
$INSTALL_DIR/eclipse -noSplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/eclipse/updates/4.7 -installIUs org.eclipse.jdt.feature.group

Simply call the script with one argument, the directory you want Eclipse installed. Running the script gives me an unpacked install of roughly 129MB, which is more than 100MB smaller than the default download (zipped). That is not to say you would not be able to shrink it further, but it should rid you of most of the crap. The executable will be cached for future executions of the script, but it will still be slow, since it needs to go online to download JDT. Unfortunately, I do not know of a way to cache the plugin download in a local folder. You could of course zip the created installation, but the script is easier to commit to git.

This script will only work for new users as long as the mirror stays up and will need some updates when a new version is released. But I am sure most developers are savvy enough to update the script if need be.

Erik Lievaart
  • 413
  • 3
  • 7
0

If you only want to use Eclipse for editing / Debugging Java I would suggest using a plain Text editor. It seems an overkill to install Eclipse and not use most of its features.

A very popular choice is VIM. Also check out this SO link for tips in using VIM as a Java editor. You can also debug Java code with a command line debugger as mentioned in this SO link.

Community
  • 1
  • 1
Ross
  • 3,008
  • 1
  • 22
  • 27
  • Thanks, but I use emacs for everything but java. I explained this in the original question. I need to use the .classpath/.project setup with teammates, and while emacs can do some amount of tagging there is not an easy, out-of-the-box set-up for it, and I've found the code introspection to be lacking compared to eclipse. The right tool for the right job. In this case, eclipse does exactly what I want with editing/debugging, it just saddles on a bunch of broken plug-ins that I don't want. So where do I get the version without the junk? – liam Jun 07 '10 at 20:26
0

Visual Studio Code

Fast forward to 2019 and we now can use Visual Studio Code with Java plugins. They provide a plugin pack to get you started with lightweight debugger and auto complete. Other plugins include maven integration, dependency viewer and more.

Visual Studio Code is a new(ish) editor/mini-ide from Microsoft which runs on Win/Max/Linux and has plugins for many languages.

Tutorial for setup: https://blog.usejournal.com/visual-studio-code-for-java-the-ultimate-guide-2019-8de7d2b59902

Edit 2019-06-21: MS now has a dedicated installer for Java integration with VS Code, including Spring Boot support as well. While the Intelisense is not 100%, it's vastly improved and now my go-to Java editor for testing and trying new things. Announcing the Visual Studio Code Installer for Java

Andrew Grothe
  • 2,562
  • 1
  • 32
  • 48
  • I use Visual Studio Code and Eclipse every day. I wouldn't use VS Code for Java development in general, ant/maven/gradle centric specifically and certainly not for JEE or Spring-based development. At. All. I only use VSCode for other things (python, js). But for Java, it falls utterly short, and you have to spend a lot of time to get it to semi-work and orchestrate all the toolchains when Eclipse (or IntelliJ) can do out out of the box. Not productive at all. – luis.espinal Apr 14 '19 at 19:57
  • Not a dig to Visual Studio Code (or the plug ins ecosystems in general). I used them ... for other things. For Java, that's a hill I opted not to fight a while ago. – luis.espinal Apr 14 '19 at 20:00
  • @luis.espinal I agree, but if you don't want Eclipse/Intellij, it's an option for a lightweight java editor. – Andrew Grothe Apr 15 '19 at 21:58
  • Eclipse has so many tedious features that once stepped in, you can hardly go back. Somebody handed over to me an Eclipse project and I searched for days and I choose to leave it in Eclipse instead of migrating it to VSCode. – Avin Shum Oct 15 '20 at 02:51
  • @AvinShum very true, but the question was for lightweight without all the integrations. VS Code isn't suitable for enterprise java, but just to try out new libraries basic code it is way faster to load and use than eclipse. – Andrew Grothe Mar 14 '22 at 13:56
0

I have figured out how to get the lightest possible eclipse with minimal efforts(imo). For the reference this is what I want in my eclipse:

  • Java project with Maven support
  • JavaEE support(Servers)
  • Debugging of Java application

(Irrespective of these you can install any feature that comes with Eclipse IDE with minimal effort, just follow the guide below)

Here's how I get it:

  1. Go to eclipse download packages (Here's the link)
  2. Find MORE DOWNLOADS (right hand side) and go to Other builds (Here's the link)
  3. Now go to any build you like (Usually Latest Downloads -> whatever the first Build Name. Also There is links for older versions and archive site)
  4. Under Platform Runtime Binary you can download Eclipse Platform as per your OS and/or requirement.
  5. Now extract the archive and run the eclipse
  6. Go to Help -> Install New Software...
  7. Using Work with you can install your desired plugins and tools which usually ships with bulky eclipse
  8. In Work with drop down select the site(mostly first) similar like this 2022-03 - https://download.eclipse.org/releases/2022-03 here 2022-03 is my eclipse version you may see different depending your version.
  9. Now you can select the group(s) or expand the group(s) and select the specific plugins which you need and also you can filter by name like maven, debug, server, marketplace client etc in filter text input just below the Work with drop-down menu.

Install plugins and enjoy your very own lightweight eclipse.

vinas
  • 41
  • 7