

Unzip the downloaded file into the directory you want the project to live in.Mac: /Library/Java/JavaVirtualMachines/jdk1.8.x.Select the appropriate Java JDK folder.Choose Configure > Project Defaults > Project Structure > JDK.From the Welcome to IntelliJ IDEA dialog:.To update IntelliJ to add the Java 8 SDK, do one of the following:.Whenever you I navigate to this directory or a sub-directory of it, then jenv will ensure that Java 12 will be used.You can create plug-ins using any IDE or code editor, but this document and examples are geared towards IntelliJ users with many IntelliJ-specific instructions. java-version file in the directory with the specified version. For example to set Java 12 for OpenWhisk, I navigate to ~/Project/openwhisk and type: Set up IntelliJ Choose Configure > Project Defaults > Project Structure > JDK Select the appropriate Java JDK folder. I like to set a given Java version on a per-directory basis using jenv local.

Update: with newer version of jenv, use jenv local * system (set by /Users/rob/.jenv/version) Jenv’s versions will provide you a list of the available versions on your system: ls /Library/Java/JavaVirtualMachines/ will tell you. The exact versions depend on what you have installed. I needed to update my openJDK to 8 version. $ jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/ $ jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home/ You can determine which version of the JDK is the default by entering java -version in a Terminal window. There can be multiple JDKs installed on the macOS system. $ jenv add /Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/ When starting a Java application through the command line, the system uses the default JDK. The next step is to add our Java versions to jenv: Restart your terminal to pick up the change. We now add jenv to our terminal by adding the following to. Looking around the Internet, I discovered jenv which shouldn’t have surprised me as I use pyenv and I’m aware of rbenv too.Īs I use Homebrew, these are the commands I used.įirstly install jenv, the latest Java (15 at this time) and any other versions you need. When working on OpenWhisk, I discovered that it needed a different Java to the one I had installed.
