How can I install OpenJDK 7
I'm trying to build android from source and I need OpenJDK 7 .
How the hell can I install it?
I looked all over
answered 2015-07-22 04:00:04 -0500
This post is a wiki. Anyone with karma >750 is welcome to improve it.
For building Android, your best bet is to just install the Oracle JDK 7. I downloaded jdk-7u80-linux-x64.tar.gz and put in /opt/oracle/java/.
Then you can just edit build/core/main.mk and force for all cases
requires_openjdk := false
Note that even if you get OpenJDK 1.7 installed on Fedora it returns 'java -version' differently than Ubuntu and you'll have to change the build/core/main.mk check for the version to look for "openjdk" instead of "java" at the beginning of the version.
Using the Oracle JDK is fine, though. It is used for all host types that are not Linux.
Can you live with OpenJDK 8?
If so, run sudo dnf search openjdk
to get an overview of all OpenJDK packages available in F22. Then select what you need: start with sudo dnf install java-1.8.0-openjdk java-1.8.0-openjdk-devel
.
If you want openjdk 7.0 go here, download the correspondig .rpm's ( java-1.7.0-openjdk and java-1.7.0-openjdk-devel) for your architecture, and install them locally using dnf
.
Is there a way to have java-1.8.0-openjdk and java-1.7.0-openjdk installed in paralell? I would like to keep 1.8 installed and updated for regular system operation, but compiling Android strictly requires OpenJDK 1.7. When I try to install them alongside, I get the following errors:
Error: installed package java-1.8.0-openjdk-1:1.8.0.45-38.b14.fc22.x86_64 obsoletes java-1.7.0-openjdk provided by java-1.7.0-openjdk-1:1.7.0.79-2.5.5.0.fc20.x86_64
Asked: 2015-05-29 20:40:07 -0500
Seen: 8,793 times
Last updated: May 29 '15
How to install Java 8 support in Eclipse Kepler?
How to launch .jar file with OpenJDK?
fedora 22 with win 8.1 overrwritten grub2
Flash plugin in Fedora22 [closed]
Fedora 17 running java return no such file or directory
How to setup dynamic hostname?
Intel Graphics Installer for Linux* 1.1.0 - don't work with Fedora 22
for check the version of java type