Just in case anyone else wants to do this, here is a script for creating a toolbox to run Eclipse IDE. I place the decompressed Oracle Java JDK in my local ~/bin/ as well as the eclipse download. I have a script to set up java. Seems to work well so far.
make_eclipse_toolbox.sh:
-----------------------------------------------------------------
#!/bin/sh
echo off
set -eux
RELEASE=’’
NAME=eclipse_toolbox
toolbox rm --force $NAME || true
toolbox create $RELEASE --container $NAME
toolbox run -c “$NAME” sh -exec ’
# Place java into a system accessible directory and add to environment.
sudo cp ~/bin/java_init.sh /etc/profile.d/
sudo mkdir /usr/local/java
sudo cp -avr ~/bin/java/jdk1.8.0_221/ /usr/local/java/
# Add eclipse runtime dependencies.
sudo dnf install gtk3 -y
sudo dnf install librsvg2 -y
sudo dnf clean packages
’
echo “to use run: toolbox enter --container $NAME”
java_init.sh:
-----------------------------------------------------------------
# /etc/profile.d/java_init.sh - JDK initialization script. Exports environment variables for JDK.
JAVA_HOME=/usr/local/java/jdk1.8.0_221
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH