-
Notifications
You must be signed in to change notification settings - Fork 0
java debian install
matveynator edited this page Feb 18, 2023
·
12 revisions
#!/bin/bash
path="/usr/lib/jvm"
echo "enter java tar.gz url (get links at https://jdk.java.net/19)"
read url
[ "${url}" == "" ] && echo "java url empty!" && exit 1
gurl ${url} > /tmp/java.tar.gz
tar xfz /tmp/java.tar.gz -C ${path}
for java_path in `ls -d ${path}/*`;
do
for app in java javac javadoc javap;
do
update-alternatives --install /usr/bin/${app} ${app} ${java_path}/bin/${app} 1
done
done