To be honest I can't recall exactly what I was doing when messing with 'java_home', but It was probably while messing about with OpenJDK or GraalVM. I beleive It's actually Java that needs the Java_Home environmental variable set, not so much the IDE. "revInternal_SetJAVA_HOME" seems to be the command that sets JAVA_HOME for the IDE, but I'm not sure where that code exists (I'll try to find it later).
This article here talks about setting the variable via with command lines on Linux, macOS and Windows: https://www.baeldung.com/java-home-on-w ... os-x-linux
SO post here: https://stackoverflow.com/questions/228 ... -os-x-10-9
The answer shows how to specify a specific version of Java to use on macOS (bash or zsh):
______________________________________________________________________________f you're using bash, all you have to do is:
echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.bash_profile
If you're using zsh (which probably means you're running macOS Catalina or newer), then it should instead be:
echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.zshrc
In either case, restart your shell.
If you have multiple JDK versions installed and you want it to be a specific one, you can use the -v flag to java_home like so:
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" >> ~/.bash_profile
I added lines that tack the ':usr/local/bin' on to the $PATH environmental variable, they weren't in the Home script originally. I'm guessing the Environmental variables are originally set by the Engine but tacking on the extra directory in the 'on start' handler works fine for me.
This shows where I added the script in the Home stack:
https://github.com/OpenXTalk-org/OpenXt ... cript#L379
The comment with that script is about a situation if you have duplicates or different versions of the same command line tool but in different directories, the operating system should search these directories in the order they're listed and stop searching once it's found a binary with the requested name in one of the directories. So you may want them in a different order if you're trying to override a version of the binary installed on the system's directory.
The reverse would be something like:
Code: Select all
put "/usr/local/bin:" before $PATH
https://forums.livecode.com/viewtopic.php?t=37042
According to 'over there' LCMark the engine inherits the $PATH variable from whatever process launched it. On macOS that's likely to be Finder.app. If this is the case then I would imagine it wasn't really an issue for Linux users, since on Linux the .desktop file probably launches the engine with shell commands it should have inherit the same Environment as Bash (or whatever alternative shell your distro may be using).