Install Java 8 in Linux
1. Before installing Java, make sure to first verify the version of installed Java.
It’s clear from the output above that the installed version of Java is OpenJDK 1.7.0_75.
2. Make a directory where you want to install Java. For global access (for all users) install it preferably in the directory /opt/java
.
3. Now it’s time to download Java (JDK) 8u45 source tarball files for your system architecture by going to official Java download page.
For reference, we have provided the source tarball file-names, please select and download these below mentioned files only.
Alternatively, you may use wget command to download files directly into the /opt/java
directory as shown below.
4. Once file has been downloaded, you may extract the tarball using tar command as shown below.
Note: I have used 64-bit tarball throughout the tutorial. If you are using 32-bit, you may change it accordingly.
5. Next, move to the extracted directory and use command update-alternatives
to tell system where java and its executables are installed.
6. Tell system to update javac alternatives as:
7. Similarly, update jar alternatives as:
8. Setting up Java Environment Variables.
9. Now You may verify the Java version again, to confirm.
Suggested: If you are not using OpenJDK (open source implementation of java), you may remove it as:
Enable Java Support in Firefox
10. To enable Java 8 JDK 8u45 Support in Firefox, you need to run following commands to enable Java module for Firefox.
On Debian, Ubuntu and Mint
On RHEL, CentOS and Fedora
11. Now verify the Java support by restarting Firefox and enter about:plugins on the address bar. You will get similar to below screen.
That’s all for now. Hope this post of mine will help you in setting oracle Java, the easiest way. I would like to know your view on this. Keep connected, Stay tuned! Like and share us and help us get spread.
출처 : http://www.tecmint.com/install-java-jdk-jre-in-linux/
'Programming > Java' 카테고리의 다른 글
Spring Boot, MySQL, JPA, Hibernate Restful CRUD API (0) | 2019.08.02 |
---|---|
Spring Boot + PostgreSQL + JPA/Hibernate CRUD Restful API (0) | 2019.08.02 |
[Java] 접근제어자 public, protected, private (0) | 2014.11.08 |
[Java] Java에서 JSON 사용하기 (0) | 2014.11.08 |
JAVA: 객체 직렬화, 멀티 쓰레드(Thread) (0) | 2014.11.03 |
댓글