You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
icedtea-web/SOURCES/altjava.patch

41 lines
1.3 KiB

--- IcedTea-Web-icedtea-web-1.8.4/shell-launcher/launchers.sh.in
+++ iIcedTea-Web-cedtea-web-1.8.4/shell-launcher/launchers.sh.in
@@ -193,6 +193,12 @@
shift
done
+java_dir="`dirname ${JAVA}`"
+alt_java="alt-java"
+if [ -e "$java_dir/$alt_java" ] ; then
+ JAVA="`dirname ${JAVA}`/$alt_java"
+fi
+
# TODO: inline args without using COMMAND[array] to unify linux/windows scripts
k=0
COMMAND[k]="${JAVA}"
--- IcedTea-Web-icedtea-web-1.8.4/rust-launcher/src/os_access.rs
+++ IcedTea-Web-icedtea-web-1.8.4/rust-launcher/src/os_access.rs
@@ -5,9 +5,19 @@
use log_helper;
pub fn create_java_cmd(os: &Os,jre_dir: &std::path::PathBuf, args: &Vec<String>) -> std::process::Command {
- let mut bin_java = jre_dir.clone();
- bin_java.push("bin");
- bin_java.push("java");
+ let mut alt_bin_java = jre_dir.clone();
+ alt_bin_java.push("bin");
+ alt_bin_java.push("alt-java");
+ let mut bin_java;
+ if alt_bin_java.exists() {
+ os.log("itw-rust-debug: alt-java found");
+ bin_java = alt_bin_java;
+ } else {
+ os.log("itw-rust-debug: alt-java NOT found");
+ bin_java = jre_dir.clone();
+ bin_java.push("bin");
+ bin_java.push("java");
+ }
let mut cmd = std::process::Command::new(&bin_java);
for ar in args.into_iter() {
cmd.arg(ar);