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
Đặ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.
ReplyDeleteE-bikes have become an increasingly popular mode of transportation, offering an eco-friendly alternative to traditional vehicles. One standout option is the elektrisch mini fiets a compact, electric bicycle designed for convenience and portability. Perfect for urban commuting, this mini e-bike provides a smooth, effortless ride with the help of an electric motor. Whether you're navigating crowded city streets or cruising along scenic paths, the elektrisch mini fiets delivers both performance and sustainability. With their growing popularity, e-bikes are shaping the future of eco-conscious travel and offering an exciting, practical way to get around.
ReplyDeleteThe automotive industry has undergone remarkable transformations, embracing innovation to enhance safety, efficiency, and sustainability. Modern vehicles feature advanced technologies like electric powertrains, autonomous driving systems, and connected car services. These developments aim to reduce emissions and improve road safety while offering unparalleled convenience. However, drivers still face challenges, such as misfuelling—a common yet costly mistake. wrong fuel servies play a crucial role in resolving these incidents, draining contaminated fuel and preventing engine damage. As the automotive sector progresses, such support services remain vital in ensuring smooth and hassle-free driving experiences.
ReplyDelete