Search code examples
javajava-8bluej

Java 8 JDK is installed but installing BlueJ fails


I'm using linux OS with Debian 11 distribution. I'm using this this documentation.

The output of javac -version is javac 1.8.0_371 indicating that I have Java 8 JDK installed.

I downloaded the specific version of BlueJ mentioned in the documentation. Then I ran sudo dpkg -i BlueJ-linux-411-duke.deb and it outputs this error messages:

Selecting previously unselected package bluej.
(Reading database ... 205849 files and directories currently installed.)
Preparing to unpack BlueJ-linux-411-duke.deb ...
Unpacking bluej (4.1.1-duke) ...
dpkg: dependency problems prevent configuration of bluej:
 bluej depends on openjdk-8-jdk | oracle-java8-jdk | oracle-java8-installer; however:
  Package openjdk-8-jdk is not installed.
  Package oracle-java8-jdk is not installed.
  Package oracle-java8-installer is not installed.
 bluej depends on libopenjfx-java | oracle-java8-jdk | oracle-java8-installer; however:
  Package libopenjfx-java is not installed.
  Package oracle-java8-jdk is not installed.
  Package oracle-java8-installer is not installed.

dpkg: error processing package bluej (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 bluej

It's saying things like Package oracle-java8-jdk is not installed. even though it is certainly installed.

I'm completely new to Java. Any feedback, help, and answers would be much appreciated.


Solution

  • I've now solved this problem by running

    sudo nano /etc/apt/sources.list
    

    Then in the sources.list file I added this:

    deb https://debian.opennms.org/ stable main
    

    Then I run this commands in order:

    wget -O - http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
    
    
    
    sudo apt-get update
    
    
    
    sudo apt-get install oracle-java8-installer
    
    
    
    sudo dpkg -i BlueJ-linux-411-duke.deb
    

    I now have BlueJ installed and can run it.