These are the instructions for the "deb"-package for BlueJ, which can be installed on Debian, Ubuntu and some other Debian-based distributions.
In general, BlueJ can be run with either OpenJDK 8 or with the Oracle JDK 8. If you do not install the Oracle JDK, installing BlueJ will cause OpenJDK to be installed automatically. Historically, the Oracle JDK has provided a better experience for use with BlueJ; however, the OpenJDK is becoming more stable and may be better integrated with your distribution. Nonetheless, you may prefer to install the Oracle JDK.
These instructions are for Debian 8, but may also work with other Debian released.
Change the working directory to the Downloads folder (or the folder you chose to save the package to) :
Install the package via the following command. You will be prompted to enter the root password:
su -c "dpkg -i BlueJ-linux-400.deb"
Note: use the correct filename; above is for BlueJ version 4.0.0. Spacing and punctuation is important!
Open the Terminal Emulator application. Type the following into the terminal window:
su -c "apt-get install java-package"
Note: you will be prompted to enter your root password.
Change the current working directory to your Downloads folder:
Make the Java package from the installer that you downloaded previously:
Note: specify the "jdk" filename exactly as it was in the download link. You will receive a number of prompts for which you can accept the default response (press Enter). The process may take several minutes to complete.
Install the package you just built:
su -c "dpkg -i oracle-java8-jdk_8u121_amd64.deb"
Note: use the correct filename, as output by the "make-jpkg" command in the previous step.
The Oracle JDK should now be installed. You may now optionally delete both the Oracle JDK installer file and the package that you built from it:
rm jdk-8u121-linux-x64.tar.gz oracle-java8-jdk_8u121_amd64.deb
Note: use the correct filenames, as downloaded/created.
Open the Terminal application. You will need to type several commands into the Terminal window. To begin, add the "webupd8" repository to your system's repositories:
sudo add-apt-repository ppa:webupd8team/java
You may be prompted for your password again; you will also be presented with a long notice, which you should read before pressing Enter to continue.
Now enter the following commands to install the Oracle JDK:
sudo apt update; sudo apt install oracle-java8-installer
You will again be presented with information and prompted; press Enter to continue with the installation.
At this stage, you will be presented with a prompt asking if you agree to the Oracle Binary Code License Agreement. You should read this agreement and choose whether or not to accept it. (If you do not accept the agreement, you cannot install the Oracle JDK).
Please see the support links on the main page.