Installing openjdk-7 on Ubuntu 18.04 is tricky, here is a link to how to get it done:
And the instructions, as promised:
“It does not look like the maintainer of openjdk-r/ppa will be updating the openjdk-7 package beyond version 7u95-2.6.4-3. That package’s description “Copied from debian experimental in Primary Archive for Debian GNU/Linux” gives us a clue about how to handle this ourselves, though.
Option 1: Manual Installation
Download the packages intended for your architecture:
(for most users, this means amd64 if 64bit, or i386 if 32bit Ubuntu is installed)
libfontconfig1 (only Ubuntu 17.10 and earlier; see note at bottom)
fontconfig-config (only Ubuntu 17.10 and earlier; see note at bottom)
(Attempt to) install the packages using dpkg:
Ubuntu 17.10 and earlier:
sudo dpkg -i openjdk-7-* libjpeg62-turbo* libfontconfig1* fontconfig-config*
Ubuntu 18.04 and later:
sudo dpkg -i openjdk-7-* libjpeg62-turbo*
Check the output from dpkg. If there were dependency problems – which is likely – you will see the following (with your architecture substituted for amd64):
Errors were encountered while processing:
If there were no dependency issues, great, you’re done, skip to #4. Otherwise, if you need to resolve some dependency issues, this is handled with:
sudo apt install -f
Notice, there is no need to re-run dpkg after letting apt resolve dependencies. It will automatically finish installation of the openjdk packages.
Update java alternatives. You can view all installed java versions with update-java-alternatives –list. To activate OpenJDK Java 1.7, run:
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
You may notice an error about the IcedTeaPlugin.so plugin being unavailable. This isn’t a real concern for developers working with the JDK.
Verify java is working:
which should output something similar to:
java version “1.7.0_161″
OpenJDK Runtime Environment (IcedTea 2.6.12) (7u161-2.6.12-1)
OpenJDK 64-Bit Server VM (build 24.161-b01, mixed mode)”
Welcome to my YouTube Channel!
Need help compiling? Go here:
I also want to provide you with a few links to help you get started:
If you really appreciate the content on this channel, or my custom roms, custom kernels, tutorials, or apps, please feel free to contribute to support purchasing more phones, tablets, internet, and other equipment used for compiling!
Xem thêm bài viết khác: https://madisonrep.org/cong-nghe