Hello,
I was trying this out on older OSes like RHEL 5 and RHEL 6, and I noticed this would not work on those OSes.
I was attempting to identify where and found that Finder.java on line 74 is coded to use the shell on /usr/bin/sh which doesn't exist on older RHEL-based OSes. Shell is in /bin/sh, the same as Alpine and MACOS.
private static final String[] LINUX_JAVA_HOME_CMDS = { "/usr/bin/sh", "-c", "echo $JAVA_HOME" };
I was wondering if the Linux shell should also be referencing /bin/sh as newer OSes like RHEL 8, RHEL 9, Ubuntu 22.04, 23.10, have /bin/sh.
Perhaps this is a better idea for now?
If that doesn't work, perhaps a new File("/usr/bin/sh").exists() to default to /bin/sh is an alternative?
Hello, I was trying this out on older OSes like RHEL 5 and RHEL 6, and I noticed this would not work on those OSes.
I was attempting to identify where and found that Finder.java on line 74 is coded to use the shell on
/usr/bin/sh
which doesn't exist on older RHEL-based OSes. Shell is in/bin/sh
, the same as Alpine and MACOS.private static final String[] LINUX_JAVA_HOME_CMDS = { "/usr/bin/sh", "-c", "echo $JAVA_HOME" };
I was wondering if the Linux shell should also be referencing
/bin/sh
as newer OSes like RHEL 8, RHEL 9, Ubuntu 22.04, 23.10, have/bin/sh
.Perhaps this is a better idea for now?
If that doesn't work, perhaps a
new File("/usr/bin/sh").exists()
to default to/bin/sh
is an alternative?