You first need to setup an Eclipse environment for general Lyo development:
- Unless already installed, you need to first install the JDK 11 to use Lyo
5.0 or newer. Older versions of Lyo and Lyo-based applications may require
JDK 8 to run.
- You also need Maven version 3.6.3 or higher.
- Pro tip: use SDKMAN! to install multiple versions of JDK and Maven and switch between them depending on the project. We recommend to
sdk install java 11.0.15-tem
provided by Eclipse Temurin as your default JDK.
- Install Eclipse IDE for Java EE Developers distribution. Alternatively, you need to install the plugins included in the JEE release, such as Eclipse Java EE Developer Tools and Eclipse Java Web Developer Tools.
- Once Eclipse is installed, you need to make sure the
JAVA_HOME
environment variable is set to the installed JDK (instead of the default JRE).- Select Window➞Preferences.
- Select Java➞Installed JREs.
- Click Add...
- In the new window that appears,
- Choose Standard VM as JRE Type.
- Click Next.
- As JRE home choose the installation dir of your JDK.
- Click Finish.
- Back to the preferences screen:
- Select the old JRE.
- Click Remove.
- Check the newly added JDK, and
- Click OK.
Eclipse M2E expects JAVA_HOME
to be defined in the OS environment variables. This presents some challenges on macOS because Eclipse.app does not typically run from a user shell. To avoid having to start Eclipse.app from a Terminal, use launchctl
set an environment variable to be set on all future processes launched by launchd in the caller's context. For example:
launchctl setenv JAVA_HOME /Users/{userId}/.sdkman/candidates/java/current
Substitute your user id for {userId}. If not using SDKMAN!, use the path to your Java 11 installation. After a reboot, JAVA_HOME
will be set to your current SDKMAN! JDK.