[Android] DiamondJohn:
Java not found on Ubuntu 18.04.01

FIXED: I installed Java using

sudo apt-get install openjdk-8-jre openjdk-8-jdk;

and now its past that step.:good:

I expect it will stop later on, as I think there is an issue with the source. But more on that later...

============================================================​

I have been building Oreo Havoc-OS on a VBox running Ubuntu 16.04 LTS

I recently created another Vbox instance running Ubuntu-18.04.1 64B, LTS, and set it up to build Pie Havoc-OS, which it does successfully:good:

However, I tried attaching my Oreo Source and kicked off a new build on this new instance, and came across the following build fail:

[COLOR="red"]FAILED:[/COLOR] /home/diamondjohndroid/android/havoc/out/target/common/obj/APPS/framework-res_intermediates/AndroidManifest.xml [COLOR="Red"]
/bin/bash -c "java[/COLOR] -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge --main frameworks/base/core/res/AndroidManifest.xml --libs frameworks/base/core/res/LineageManifest.xml	--out /home/diamondjohndroid/android/havoc/out/target/common/obj/APPS/framework-res_intermediates/AndroidManifest.xml"
[COLOR="Red"]/bin/bash: java: command not found[/COLOR]
[ 0% 173/78387] Notice file: system/extras/f2fs_utils/NOTICE -- /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/NOTICE_FILES/src/system/lib/libf2fs_sparseblock.so.txt
[ 0% 174/78387] Check module type: /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libext2_com_err_intermediates/link_type
[ 0% 175/78387] Notice file: system/extras/ext4_utils/NOTICE -- /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/NOTICE_FILES/src/system/lib/libext4_utils.so.txt
[ 0% 176/78387] Notice file: hardware/libhardware_legacy/NOTICE -- /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/NOTICE_FILES/src/system/lib/libhardware_legacy.so.txt
[ 0% 177/78387] Notice file: hardware/libhardware/NOTICE -- /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/NOTICE_FILES/src/system/lib/libhardware.so.txt
[ 0% 178/78387] Notice file: system/libhwbinder/NOTICE -- /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/NOTICE_FILES/src/system/lib/libhwbinder.so.txt
[ 0% 179/78387] Notice file: external/protobuf/NOTICE -- /home/diamondjohndroid/android/havoc/out/target/product/ks01ltexx/obj/NOTICE_FILES/src/system/lib/libprotobuf-cpp-lite.so.txt
[ 0% 180/78387] target Prebuilt: sdk_v21 (/home/diamondjohndroid/android/havoc/out/target/common/obj/JAVA_LIBRARIES/sdk_v21_intermediates/classes.jar)
[ 0% 181/78387] host C++: conscrypt_generate_constants <= external/conscrypt/constants/src/gen/cpp/generate_constants.cpp
ninja: build stopped: subcommand failed.
20:25:44 ninja failed with: exit status 1

My guess its one of the things below (or something completely different:o).

1. Oreo is not meant to be built with the Java version pre-installed on Ubuntu v18.04.01

2. I have not run one of the required "apt install" statements specifically required for building Oreo. Running "java -version" returns

$ java -version

Command 'java' not found, but can be installed with:

sudo apt install default-jre
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless

3. I need some extra config / path to get it to see java.

4. I need to install the java jdk as here: https://vitux.com/how-to-setup-java_home-path-in-ubuntu/ But I dont want to install something if I dont need to ie

sudo apt install openjdk-8-jdk

and if I need to, whats the max Java version I can install and compile Oreo with?

Any guidance?