Friday, August 10, 2018
Linux installation comes with OpenJDK, but you want to use the official JDK from Oracle instead to run most of the software. This post will show you the steps to install the Oracle JDK
First let's check to see what version of JDK we have installed by running the command
java -version
As you can see Fedora installs the OpenJDK library by default. What we want to do is replace it with the Oracle version instead.
Type the address http://www.oracle.com/technetwork/java/javase/downloads/index.html
into Firefox in the Fedora VM and click on the "JDK" download button
Accept the license agreement and download the Linux version
Select "Save File" then click "OK"
Once the file is downloaded you can find the file at your home directory by typing
cd ./Downloads/
Now we want to create a folder call java in the path /usr/local with this command
sudo mkdir -p /usr/local/java
Since this is going to be our development machine we can just switch to the super user with the command sudo su to speed things up
Now copy the files to the local/java folder with this command
cp -r jdk-10.0.2_linux-x64._bin.tar.gz /usr/local/java
Navigate to the /usr/local/java folder with the command cd /usr/local.java and extract the .tar file with this command
tar xvzf jdk-10.0.2_linux-x64._bin.tar.gz
Open the /etc/profile file with the command nano /etc/profile and add the following line to the end of the file
JAVA_HOME=/usr/local/java/jdk-10.0.2
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
Press Ctrl+O to save the file, then Press Ctrl+X to exit
Type the following commands in the terminal
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk-10.0.2/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk-10.0.2/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk-10.0.2/bin/javaws" 1
Type in the following commands to make Oracle JDK the default JDK
sudo update-alternatives --set java /usr/local/java/jdk-10.0.2/bin/java
sudo update-alternatives --set javac /usr/local/java/jdk-10.0.2/bin/javac
sudo update-alternatives --set javaws /usr/local/java/jdk-10.0.2/bin/javaws
Type the following command to apply the configuration in the /etc/profile file
Reboot Fedora by typing reboot
You have successfully installed the Oracle JDK on Fedora.
Similar Posts:
First let's check to see what version of JDK we have installed by running the command
java -version
As you can see Fedora installs the OpenJDK library by default. What we want to do is replace it with the Oracle version instead.
Type the address http://www.oracle.com/technetwork/java/javase/downloads/index.html
into Firefox in the Fedora VM and click on the "JDK" download button
Accept the license agreement and download the Linux version
Select "Save File" then click "OK"
Once the file is downloaded you can find the file at your home directory by typing
cd ./Downloads/
Now we want to create a folder call java in the path /usr/local with this command
sudo mkdir -p /usr/local/java
Since this is going to be our development machine we can just switch to the super user with the command sudo su to speed things up
Now copy the files to the local/java folder with this command
cp -r jdk-10.0.2_linux-x64._bin.tar.gz /usr/local/java
Navigate to the /usr/local/java folder with the command cd /usr/local.java and extract the .tar file with this command
tar xvzf jdk-10.0.2_linux-x64._bin.tar.gz
Open the /etc/profile file with the command nano /etc/profile and add the following line to the end of the file
JAVA_HOME=/usr/local/java/jdk-10.0.2
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
Press Ctrl+O to save the file, then Press Ctrl+X to exit
Type the following commands in the terminal
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk-10.0.2/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk-10.0.2/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk-10.0.2/bin/javaws" 1
Type in the following commands to make Oracle JDK the default JDK
sudo update-alternatives --set java /usr/local/java/jdk-10.0.2/bin/java
sudo update-alternatives --set javac /usr/local/java/jdk-10.0.2/bin/javac
sudo update-alternatives --set javaws /usr/local/java/jdk-10.0.2/bin/javaws
Type the following command to apply the configuration in the /etc/profile file
Reboot Fedora by typing reboot
You have successfully installed the Oracle JDK on Fedora.
Similar Posts:
- Using Fedora As Your Development Desktop
- Fedora: Making VirtualBox Fullscreen by Installing Guest Additions
- Docker : Pull The Latest Fedora Image Into A Ubuntu Server
- Fedora: Install Eclipse IDE
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Đặt vé máy bay tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ tháng nào rẻ nhất
bay từ mỹ về việt nam
é bay từ nhật về việt nam
vé máy bay khứ hồi từ đức về việt nam
giá vé máy bay từ Vancouver về việt nam
Máy bay từ Hàn Quốc về Việt Nam
chi phi ve may bay cho chuyen gia nuoc ngoai
Transform your event into an unforgettable experience by choosing to make your event magical with a strolling magician. These enchanting performers move through the crowd, captivating guests with close-up magic that amazes and delights. Their interactive tricks create personal moments of wonder, making everyone feel like part of the magic. Whether it's a corporate event, wedding, or party, a strolling magician adds an element of surprise and excitement. Make your event magical with a strolling magician and watch as your guests are spellbound, ensuring your event is remembered for years to come.
ReplyDelete