From 41e8c29a9824640b0e355f2e897d643fbcf8fa87 Mon Sep 17 00:00:00 2001 From: Dom Whewell Date: Sun, 10 Nov 2024 18:10:15 +0000 Subject: [PATCH] Set the java home in the jadx script --- bbot/modules/jadx.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bbot/modules/jadx.py b/bbot/modules/jadx.py index 93553be63..45db9a81a 100644 --- a/bbot/modules/jadx.py +++ b/bbot/modules/jadx.py @@ -37,16 +37,6 @@ class jadx(BaseModule): "become": True, "when": "ansible_facts['os_family'] == 'RedHat'", }, - { - "name": "Set JAVA_HOME (Fedora)", - "lineinfile": { - "path": "/etc/profile.d/java.sh", - "line": "export JAVA_HOME=$(readlink -f /usr/bin/java | sed 's:bin/java::')", - "create": True, - }, - "become": True, - "when": "ansible_facts['os_family'] == 'RedHat'", - }, { "name": "Install latest JRE (Alpine)", "package": {"name": ["openjdk11"], "state": "present"}, @@ -66,6 +56,16 @@ class jadx(BaseModule): "remote_src": True, }, }, + { + "name": "Set JAVA_HOME (Fedora)", + "lineinfile": { + "path": "#{BBOT_TOOLS}/jadx/bin/jadx", + "line": "JAVA_HOME=/usr", + "insertafter": "BOF", + }, + "become": True, + "when": "ansible_facts['os_family'] == 'RedHat'", + }, ] allowed_file_types = ["java archive", "android application package"]