I am having trouble running Aptana Studio 3 on a Mac where multiple versions of JDK are installed (i.e., jdk1.8.0_271.jdk and jdk-11.0.2.jdk). Aptana requires JDK 8, and when only it is in the Library/Java/JavaVirtualMachines will Aptana run, otherwise, I get startup fatal errors. I need Open JDK 11 for another application and it runs with both JDKs installed. I tried to set JDK 8 as the default in a .bash_profile using the following, but for some reason (probably an obvious one that answers this question) Aptana doesn't recognize the default setting and only runs when I remove the jdk-11.0.2.jdk from JavaVirtualMachines. I know there is a version control package jenv, but I don't have it installed, and not sure it would fix the problem anyway. Appreciate any pointers on how to resolve this, if I can/should add a shell to the package contents of Aptana, proper mods on the commands below, etc. Running Mac Mojave 10.14.6. Thanks.
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 java8
export JAVA_HOME=$JAVA_8_HOME
macOSpicks the most recent version ofJDK. You have few options here:JDKsthat you don't want to useTerminalsession for using give versionJDKversionsAs you already mentioned, you can use some existing tool (e.g.
jenv)