Lightweight eclipse installation (or “yet anther blog post about installing Eclipse”)
A new Eclipse version 2021-03 (4.19) was just released and what better way to celebrate than to make yet another blog post about installing a lightweight standalone version of it for ADT.
Based on the Installing lean Eclipse with ADT by the magnificent Matthew Billingham, and Running ABAP in Eclipse from a USB stick powered by SapMachine by the awesome Andre Fischer, I hereby take the liberty of making a new post combining those two.
This guide is for implementing a new lightweight installation of Eclipse and ADT in a new directory, using a separate SAP provided Java runtime for it.
If you’re already running Eclipse and ADT and want to try this lighter version, you might want to keep your workspace safe separately during the installation, and convert it later.
The official installation procedure suggests installing Eclipse IDE for Java Developers, but as Matthew so graciously shared with us, we don’t need all that for running ADT.
Also worthy of a note is that as of the time of writing this, SAP does not mention officially supporting 2021-03 (4.19) for ADT, but my guess is that is just a matter of time. If you’re willing to accept the risk, here’s what we do:
Either use this direct link or navigate from elipse.org by clicking the Download button, then go to the “Download packages” link below the “Download” button, then “Other Builds” in the “More Downloads” section.
Now we click 4.19 in the “Latest Download” section, and scroll down to Platform Runtime Binary and download the version for the platform you use. In my case it Windows.
After the download is complete, unpack the zip file into a folder of your liking. I chose C:\eclipse\, which gives me Eclipse in C:\eclipse\eclipse.
Installing the Java JRE
In order to run Eclipse, a 64-bit Java 11 runtime is required and there is a SAP provided OpenJDK for SAP customers and partners. It’s call SapMachine, and the official repository is on GitHub.
It might be the case that you already have a running 64-bit Java 11 runtime on your machine and in that case this step is not strictly required. I’m not sure if there is any benefit from running this version in parallel in that scenario, but this is the SAP recommended way, and a nice way to have a standalone dedicated compatible runtime.
Download the SapMachine from the GitHub repository or through sapmachine.io.
After the download is complete, unpack the zip file into the unpacked eclipse folder from before and name it jre.
If you want your Java in a different directory than jre, refer to this documentation.
I typically create a new workspace at this point, since my current one has information also about ADT things and Add-ons that are not yet installed.
Inside the eclipse directory, C:\eclipse\eclipse in my case, there is eclipse.exe. Let’s go ahead an run that one. You will be asked which workspace to use, I put mine in C:\eclipse\workspace.
In order to install the ADT, the menu options to select is Help -> Install New Software.
The link to use https://tools.hana.ondemand.com/latest/. Put it in the Work with input field and click Add for good measure. Give it a name of your liking, I called mine ADT latest.
ABAP Development Tools is, aptly, the ABAP Development tools. The other three items may also be installed. Please refer to tools.hana.ondemand.com for more information of their uses and if they’re relevant for you.
Choose (at least) ABAP Development Tools, and click Next 2 times, then Accept the terms of the license agreements and click Finish.
There may be a question about accepting a certificate and then a request to restart Eclipse. I recommend complying!
Installing the Marketplace client (optional)
In order to install optional additional add-ons for Eclipse, you would also need to install the Eclipse Marketplace Client. The link for the current version can be found by clicking the fourth icon from the left under the Install button. 🙂 For the versions in this document, it’s this link.
The process is the same as for installing ADT: Help -> Install New Software, and use that link instead. Mark EPP Marketplace Client, Next, Next, Accept, Finish, Restart Now.
Installing Add-ons (optional)
We have the menu option Help -> Eclipse Marketplace now, where we can find additions for the Eclipse platform in general, and for ABAP in particular. Search for ABAP and you will find. This can be done at any time and is not required to get started.
(A note about dark theme later)
Tweaking and customizing (optional)
If you have an old workspace that you want to use, now might be the time to make a backup copy before converting and running it, in case the conversion of it is not working properly (which I’ve never experienced).
There is a lot of customizing possible in Eclipse. Choosing the views to have available and where to put them on the screen is a matter of personal preference and workflow, and could be a topic for a blog post of its own. And there will be links further down.
Dark Theme (optional)
One thing worth mentioning though is about the theme. I personally prefer a dark theme in general and also in Eclipse. There is an Eclipse built-in dark theme that can be set at Window -> Preferences -> General -> Appearance. This is also “supported” or at least, not officially discouraged by SAP. 🙂
It pretty good, there is matching syntax coloring for ABAP out of the box for it. I recommend that for the quickest route to the dark mode. For me however, I’m really bothered by the white divider lines in table views, which is an Eclipse thing and not ADT, so I chose another option (and I am willing to pay the price for it…)
A common, and I think the most popular, option is to install the add-on Darkest Dark. That one also has a good default syntax coloring for ABAP, but is also, allegedly, very bloated and not very “clean” technically (reference needed). That one can be found and installed in the marketplace.
But my personal preference is the open source Spectrum theme, also available through the marketplace. It does not have any default dark syntax coloring for ABAP, so it looks totally awful for ABAP at first. But if you’re willing to do the work though, you can get it just the way you want it. Again it’s personal preference, and this is what my syntax highlighting setup looks like:
Relevant places for color settings in Eclipse are in Windows -> Preferences. Firstly General -> Appearance -> Colors and Fonts. And secondly ABAP Development -> Editors -> Source Code Editors -> ABAP Keyword Colors.
But how to ADT in Eclipse? (semi-mandatory)
Yes, that’s a whole other topic. The marvelous Michael Keller put together this info hub repository on the topic. There are plenty of useful links so I will not fill this post with them as well. It’s includes as well some recent blog posts with videos from the fantastic Frederic Girod.
Now have fun!
thanks for the comment !
But, two things:
Yes, I saw this question about the Darkest Dark theme, which SAP clearly does not support or encourage. The arrow thing described there is the same for me, but differ between computers so it's probably a OS config thing. I do not have the background color to pitch black, so I can see still see my arrows. 🙂
That's what my wife says. But humility is one of my greatest qualities. You've never met anyone more humble and self-effacing than me. I'm better at it than anyone. 😁
Seriously, thanks for the kind words.
I've given up on themes. I just use the default. The reason is that I work on on numerous development requests, and I find it easier to have one workspace per request. However, I keep forgetting to copy the settings to the new workspace.
And I don't use lean installation any longer. The reason for this is I need Java and the Plug In Development environment as I'm developing a plug-in to one of our back-end products.
That makes a lot of sense. For my part it's quite the opposite, I copy my installation and workspace to client computers (with their permission and approval of course) to have the same experience there as well. So I'm separated by hardware per my current clients...
I think this method is from OpenSAP course "Writing Testable Code for ABAP"?
Bingo! I recently took it on recommendation, and got a lot of insight...
Well, you beat me to those bonus points, I was about to give the same answers. 😉
I still draw lots of value from this blog, as I'm about to follow it just now! Thanks Jörgen Lindqvist !
Haha, guess what I've done some seconds ago ... yep, added your blog to the info hub 🙂 Oh, and thanks for the flowers! And now let us be serious: Another great blog! As I have to write a lot of downward compatible code actually, Eclipse is my best friend. Really, every day. I'm not sure but "Quick Fix" would have to get its own employment contract, that's how much this "colleague" works 😉
Thanks so much, especially Jörgen Lindqvist and Matthew Billingham !
I loved Eclipse but hated it for being so slow. Now it's fast!
Thanks for your blog!
I followed it and it worked really nicely!
Is there any shortcut available in Eclipse to convert a line into camel case?
Thanks for this great blog!
Love the Idea to use something lightweight and also get rid of the darkest dark add-on but i'm stuck in the coloring options with Spectrum Theme for almost an hour and it still looks awful.
Is there a way to export your configuration or to show which colors needs to be changed?
The ABAP Keyword Colors are not my Problem more the normal Syntax, Selection, Search ....
Yes, well, it took a while for the Spectrum Theme. Hope to be able to use the built-in dark theme in a future version, when the table border lines are handled...
Setting it up, not all of the changes reflected right away, so there were a lot of restarts of eclipse after changing the settings for them to become active.
Anyway, I posted the three workspace files that might be needed on my Github. If you think you need any other file, just let me know... 🙂