Skip to content

Add some essential commands #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions installjava
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ then
apt install wget -y
fi

if ! hash proot > /dev/null
then
apt install proot -y
fi

print_status() {
printf "(>) ${1}...\n"
}
Expand Down Expand Up @@ -42,6 +47,21 @@ export LIB_DIR="\$PREFIX/share/glib"
export LD_LIBRARY_PATH="\$LIB_DIR"
exec proot -0 \$JAVA_HOME/bin/java "\$@"
CONF
chmod 777 $PREFIX/bin/java


cat <<- CONF > $PREFIX/bin/javac
#!/usr/bin/bash

unset LD_PRELOAD
export JAVA_HOME="$PREFIX/share/jdk8"

export CLASSPATH=".:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar"
export LIB_DIR="\$PREFIX/share/glib"
export LD_LIBRARY_PATH="\$LIB_DIR"
exec proot -0 \$JAVA_HOME/bin/javac "\$@"
CONF
chmod 777 $PREFIX/bin/javac
}

cleanup() {
Expand Down