How to update the JRE in LiClipse
Posted by Jim DeLaHunt on 28 May 2021 at 06:14 pm | Tagged as: robobait, software engineering, technical support
I use the LiClipse software development environment (IDE) for most of my software development. It is a distribution of the Eclipse Project IDE, with PyDev, and its own Java runtime environment (JRE), and some extras. I like it because I can, by installing more components, work with more software languages. Most of the time, one can update the various components of an Eclipse IDE using the internal “Check for Updates” function. However, my installation had reached the point where updating the components required upgrading the JRE. The documentation for the latter upgrade was inadequate. Here is what I figured out. It worked for me. I hope these instructions are helpful for others.
The Eclipse Check for Updates menu command does much of the work necessary to update an Eclipse installation. It checks distribution websites to see which updates are available for your existing components. It compares the requirements for those updates against your existing components. It fleshes out the updates list with any newly-required components which must be added. And, if there is a conflict of some sort — for instance, if a component is too old to support an update — it lets you know of the conflict, and stops.
I was using LiClipse 7.1.0, based on Eclipse Platform 4.17. LiClipse 7.3.0 became available as an update. The Check for Updates command gave me error messages like this:
Cannot complete the install because some dependencies are not satisfiable Software being installed: a.jre.javase 1.7.0 Software being installed: LiClipse 7.3.0.202104100947 (com.brainwy.liclipse.rcp.product 7.3.0.202104100947) Cannot satisfy dependency: From: LiClipse 7.3.0.202104100947 (com.brainwy.liclipse.rcp.product 7.3.0.202104100947) To: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group [4.18.0.v20201202-1800,4.18.0.v20201202-1800] Cannot satisfy dependency: From: Debug Core 3.17.0.v20201109-1948 (org.eclipse.debug.core 3.17.0.v20201109-1948) To: osgi.ee; (&(osgi.ee=JavaSE)(version=11)) Cannot satisfy dependency: From: Eclipse Platform 4.18.0.v20201202-1800 (org.eclipse.platform.feature.group 4.18.0.v20201202-1800) To: org.eclipse.equinox.p2.iu; org.eclipse.debug.core [3.17.0.v20201109-1948,3.17.0.v20201109-1948]
I won’t attempt to decode these error messages here. (A Stack Overflow question, How can I comprehend this Liclipse (Eclipse) upgrade failure error message?, might attract some answers someday.)
But the crucial insight is that “‘osgi.ee; (&(osgi.ee=JavaSE)(version=11))
‘ is saying it needs at least Java 11″ (source: @greg-449 at that Stack Overflow question). The LiClipse website says, LiClipse 7.2.0 uses Eclipse 2020-12 (4.18) and “Java 11 is now required”.
What I have installed is “java version “1.8.0_77”. And this is LiClipse’s own Java runtime environment (JRE). It is inserted specially by the LiClipse distributor into the LiClipse installer. It is not provided through the Eclipse updates mechanism. Thus the Eclipse updates mechanism cannot update it. As far as I know, I must download a new copy of LiClipse, and install it, to update that JRE.
I love that Eclipse lets me install more components so that I can develop in a variety of programming languages. I love it that Eclipse’s Check for Updates command mostly keeps all these components up to date and consistent. I sure don’t want to have to re-install all those components when I have to do a re-install of LiClipse.
Fortunately, Eclipse (and thus LiClipse) have a workaround: updating a newly-installed LiClipse installation based on an existing installation. That is what I did. The steps are:
- Quit from the old version of LiClipse.
- Be sure that your existing workspace directory is backed up. What you are about to do should not, in theory, harm it. But in practice, things do go wrong. You do back up your computers every hour or so anyway, correct?
- From the LiClipse download page, download the installer for the new version of LiClipse.
- Install the new version of LiClipse, being sure that it does not replace the previous version of LiClipse.
- Run the new version of LiClipse, by right-clicking on its application icon, and selecting “Open” from the popup menu.
- If you see an error message, ‘”LiClipse.app” is damaged and can’t be opened. You should move it to the Trash.’, then perform these commands from the Terminal:
xattr -d com.apple.quarantine /Applications/LiClipse.app
xattr -d com.apple.quarantine /Applications/LiClipse.app/Contents/MacOS/LiClipse
(For more on why, see LiClipse macOS installation instructions.) - Then try again: Run the new version of LiClipse, by right-clicking on its application icon, and selecting “Open” from the popup menu.
- If you see an error message, ‘”LiClipse.app” is damaged and can’t be opened. You should move it to the Trash.’, then perform these commands from the Terminal:
- LiClipse will prompt you to select a directory to serve as the workspace. Point it at your existing workspace directory.
- LiClipse may warn you that it will upgrade your workspace, and old versions of Eclipse won’t be able to use it anymore. Accept the upgrade. (This is one moment when you are glad to have a backup of the workspace.) LiClipse opens.
- In LiClipse, select menu option File… Import… The Import dialogue appears.
- Select the folder Install from that dialogue. Items appear under Install. Select From Existing Installation.
- Click the “Next >” button, The Import from Application dialogue appears.
- At the field, “From application installation”, click the “Browse…” button. A File Open dialogue appears.
- Navigate to the application icon for the previous version of LiClipse. Click the “Open” button. The File Open dialogue disappears. A list of Eclipse components appears in the lower part of the Import from Application dialogue. These are the components used by the previous copy of LiClipse.
- Select those components which you want to import and use in the new version of LiClipse. (I selected all of them.) Complete the installation process as normal. You return to the main LiClipse application.
- Just to confirm, select menu item Help… Check for Updates. Update anything else offered which you wish to take. (There were none for me.) You should not encounter the “Cannot complete the install because some dependencies are not satisfiable” error message.
You have now successfully updated the JRE in LiClipse.
I asked, How can I update the Java environment for LiClipse on macOS? on StackOverflow. I did not get an answer in a couple of months, so I figured this out. If you face this same need in the future, check out that StackOverflow question. Good answers good answers may have appeared since I wrote this.