Installing the Java runtime environment

Instructions for installing the Java runtime environment, a ROSE software dependency.

Red Hat Enterprise Linux 7

Debian 7 "Wheezy"

See Debian 8 "Jessie".

Debian 8 "Jessie"

Download the required version of the Java Runtime Environment (JRE). At the time of this writing (Sep 2015) ROSE requires Sun/Oracle Java 7. These instructions assume you've jumped through the appropriate download hoops and have a file named ~/Downloads/jdk-7u51-linux-x64.tar.gz. Then run these commands as the administrator:

mkdir -p /usr/lib/jvm
cd /usr/lib/jvm
tar xf ~/Downloads/jdk-7u51-linux-x64.tar.gz
ln -s jdk1.7.0_51 java-7-sun
cd java-7-sun/bin
for f in $(find . -maxdepth 1 -type f -perm -500 -printf '%f\n'); do \
[ "$f" != "./apt" ] && update-alternatives --install /usr/bin/$f $f /usr/lib/jvm/java-7-sun/bin/$f 1072; \

Make sure the "apt" command doesn't point to a symbolic link in /etc/alternatives (e.g., run ls -l $(which apt)). Once you've completed these steps, make sure that javac -version reports 1.7.0_51.

Ensure that the LD_LIBRARY_PATH contains both the java-7-sun/lib directory and the java-7-sun/jre/lib/amd64/server directory when building ROSE and when running ROSE java analysis or you may experience segmentation faults during the analysis.

Ubuntu 14.04 "Trusty Tahr"

Follow the instructions for Debian 8.

Ubuntu 16.04 "Xenial Xerus"

Follow the instructions for Debian 8, except use "1082" instead of "1072".

Collaboration diagram for Installing the Java runtime environment: