Eclipse and Java

I wrote something a while back https://wmbuck.net/blog/?p=1053 about reinstalling eclipse. The installation was in my local directory, and includes an eclipse.ini which has all the startup stuff for eclipse.

Today I realized that the file, as installed by the eclipse installer, has a direct fully specified name for the jre to be used, down to the last nit:

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.fc30.x86_64/jre/bin

This is the kind of thing which makes it hard for people who don’t already have a lot of linux experience.

There is an alternatives entry for the jre in /etc/alternatives/jre, and there is a symlink from /usr/lib/jvm/jre to the alternative — all set up and waiting to make it easy for a new install to come along and update the version of the jre. Just change the symlink and everybody is happy. So all anybody has to do in order to have the latest and greatest jre is to say:

/usr/lib/jvm/jre/bin

So is the handy alternative link being used? Of course not, that would be too easy.

After doing some update yesterday, today I find eclipse won’t start. And what does the error message say? Does it say “We updated the jre behind your back, so now you have to update the eclipse.ini? No. Does it say, we found in the eclipse.ini a great long fully specified pointer to a jre that isn’t there any more, because you did an upgrade? Of course not.

It says: eclipse needs a jre and you don’t have one.

Liar. I had one yesterday. Good thing I know what a jre is and where to look for it. Good thing I know what alternatives are. Good thing I know there is an eclipse.ini file in the folder where eclipse is started. This is why various of my technologically sophisticated friends can’t make the transition to linux.