This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
help-center-docs/software/java/en.md

53 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2017-02-26 21:30:46 +00:00
+++
title = "Java"
2018-01-04 06:25:54 +00:00
lastmod = "2018-01-04T06:24:56+03:00"
2017-02-26 21:30:46 +00:00
+++
# Java
2017-02-10 14:45:40 +00:00
This article covers obtaining open source Java as well as Oracle Java.
## Installation
If you are looking for OpenJDK or OpenJRE, install `openjdk-8` from the repository. The instructions below are for Oracle Java.
You can set up Java by following the instructions below:
## JRE
Grab the Java Runtime Environment (JRE) as `.tar.gz` from the [Oracle Download Page](http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html).
Extract JRE and move it to /opt:
``` bash
cd ~/Downloads
2018-01-04 06:25:54 +00:00
tar xf jre-8u152-linux-x64.tar.gz
sudo mv jre1.8.0_152 /opt/
sudo ln -svf /opt/jre1.8.0_152/bin/java /usr/bin/java
```
To enable Java in Firefox:
``` bash
mkdir -p ~/.mozilla/plugins
2018-01-04 06:25:54 +00:00
ln -s /opt/jre1.8.0_152/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so
```
## JDK
2018-01-04 06:25:54 +00:00
Grab the Java Development Kit (JDK) as `.tar.gz` from the [Oracle Download Page](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133152.html).
Extract JDK and move it to /opt:
``` bash
cd ~/Downloads
2018-01-04 06:25:54 +00:00
tar xf jdk-8u152-linux-x64.tar.gz
sudo mv jdk1.8.0_152 /opt/
sudo ln -svf /opt/jdk1.8.0_152/bin/java /usr/bin/java
```
To enable Java in Firefox:
``` bash
mkdir -p ~/.mozilla/plugins
2018-01-04 06:25:54 +00:00
ln -s /opt/jdk1.8.0_152/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so
```