Crap. I hit this barrier `Your Java version 15.0....
# sdf
d
Crap. I hit this barrier
Your Java version 15.0.1 is not compatible with CLI for Node.js. Install Oracle JDK version 11.
... Is there a way to install/run JDK 11 for just suitecloud, and let 15.0.1 stay? Or do I need to uninstall 15 and install 11?
a
You can just change the env variables to point to java version needed.
d
I don't follow
a
Depending on the OS, there are some dependency managers also.
Where you can specificy the java versions on the go.
d
Frustrated. I had this working previously.
a
The point us you don't need to uninstall the java. 1, in env variables you can point the java version you need to use. 2. As i said you can search for dependency managers/package managers. They let you define java versions for different directories.
The java version is a pre-requisite. How was it working properly?
Suitecloud cli doesn't work with java version other than 11. Whis is an LTS
d
Saturday morning, I rebuilt my MacBook.
I'm saying that as of friday, I could run suitecloud from the command line no problem. I know I had the latest JDK as well. I don't recall doing anything special to make that all work. I get it, it needs JDK 11. I'm just not sure how it worked previously
Clearly, I must of had multiple JDK's installed. 11 being one of them
I simply don't know how to tell my shell to run suitecloud against JDK11, and everything else from JDK15
s
p
@darrenhillconsulting, I usually follow this one https://medium.com/@devkosal/switching-java-jdk-versions-on-macos-80bc868e686a. However it will require you to manually switch but there’s a small command for it 🙂
d
Thanks everyone, I'll give these a read. I swear I did no switching before though .. I must have had the bash sheel preconfigured to use JDK11 or something
s
I have installed things through brew on my MacBook that added dependencies, and the dependencies installed a newer or older version o f java or jdk and set it as the default. It’s possible that happened to you. Fortunately, switching back to your desired default version is easy.
I also use those instructions from the link above (it’s bookmarked in my browser) since I have had to do it more than once now
d
All, I've got this working .. thanks @Petter. I just need to figure out how to set my .zsh profile to set JAVA_HOME by default
👍 1
p
For Reference, from my .zshrc file:
Copy code
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8)
export JAVA_11_HOME=$(/usr/libexec/java_home -v11)
alias java8='export JAVA_HOME=$JAVA_8_HOME'
alias java11='export JAVA_HOME=$JAVA_11_HOME'
# default to Java 11
java11