Connect with us

Linux

How to Install and Configure Java on Ubuntu 20.04

Published

on

How to Install and Configure Java on Ubuntu 20.04

Java is one of the most popular programming languages ​​used to build various types of applications and systems. Java runs on all operating systems and devices. We can find applications developed in Java on your laptop, mobile phone, and game console.

In this guide, we will learn how to install Java on Ubuntu 20.04.

Before starting

There are several different Java implementations. OpenJDK and Oracle Java are the two main implementations of Java, with almost no difference between them except that Oracle Java has some additional commercial features. The Oracle Java license only permits non-commercial use of the software, such as personal use and development use.

The default Ubuntu 20.04 repository includes two OpenJDK packages, the Java Runtime Environment (JRE) and the Java Development Kit (JDK). The JRE consists of the Java virtual machine (JVM), classes, and binaries that make it possible to run Java programs. The JDK includes the JRE and the development/debugging tools and libraries needed to build Java applications.

If you are not sure which Java package to install, the general recommendation is to install the default version of Java, which is the OpenJDK version (JDK 11). Some Java-based applications may require a specific Java version, so as a user, it is mandatory to read the application documentation.

Install Java OpenJDK 11 on Ubuntu 20.04

At the time of writing, Java 11 is a long-term supported (LTS) version of Java. It is also the default Java development and runtime in Ubuntu 20.04.

Run the following command as a user with Sudo or root privileges to update the packages index and install the OpenJDK 11 packages:

sudo apt update
sudo apt install openjdk-11-jdk

The JRE is included in the JDK package. If you only need the JRE, install the OpenJDK-11-JRE. For minimal Java runtime, install the OpenJDK-11-JDK-headless.

Once the installation is complete, verify by checking the Java version:

java -version

The output will look like this:

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)

At this point, the Java installation on the Ubuntu system has been successful.

Install Java OpenJDK 8 on Ubuntu 20.04

Java 8, the earlier LTS version of Java, is still widely used. If your application is running on Java 8, you can install it by typing the following command:

sudo apt update
sudo apt install openjdk-8-jdk

Verify the installation by checking the Java version:

java -version

The output will look like this:

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Set Default Java Version on Ubuntu 20.04


If you have multiple versions of Java installed on the system, To check the default Java version, you can use the following command:

java- Version

To be able to change the standard version, use the tools update-alternatives as shown below:

sudo update-alternatives --config java

The output will look like the following

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection Path Priority Status
-------------------------------------------------- ----------
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
  1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
  2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode

Press <enter> to keep the current choice[*], or type selection number: 

You will be presented with a list of all installed Java versions. Enter the version number you want to use as the default and press Enter.

Set JAVA_HOME Environment Variable

Some applications written in Java use environment variables JAVA_HOMEto specifies the Java installation location.

To set the JAVA_HOME environment variable, use the command update-alternatives to find where Java is installed:

sudo update-alternatives --config java

In our case, the installation path is as follows:

  • OpenJDK 11 is located at /usr/lib/jvm/java-11-openjdk-amd64/bin/java
  • OpenJDK 8 is located at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

Copy the installation path of the installation of your choice. Next, open the file /etc/environment :

sudo nano /etc/environment

Add the following line, at the end of the file:

/etc/environment
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"

Make sure to replace the path with the path to your Java version of choice.

You can log out and then log back in, or run the following source command to apply the changes to the current session:

sources /etc/environment

To verify that the environment variables are JAVA_HOMEset correctly, run the following echo command:

echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64

/etc/environment is the system configuration file, which is used by all users. If you want to set variables JAVA_HOMEon on a per user basis, add a line to .bashrcor other configuration file that is loaded when the user logs in.

How to Uninstall Java on Ubuntu 20.04

If for some reason you want to uninstall a Java package, you can uninstall it like any other package installed with apt.

For example, if you want to remove a package default-JDK just run the command:

sudo apt remove openjdk-11-jdk

Conclusion

OpenJDK 11 and OpenJDK 8 are available in the default Ubuntu 20.04 repositories and can be installed using the apt package manager.

Advertisement

Linux

Reminder, Ubuntu 21.04 (Impish Indri) Support Will End Soon

Published

on

Reminder, Ubuntu 21.04 (Impish Indri) Support Will End Soon

It’s no secret that the Ubuntu Linux distro is currently one of the most popular and widely used Linux distributions, especially for the general public and at home, all of this because this distribution is already quite popular for its ease of use, even though currently almost all common Linux distributions are already have the same user experience.

Now about Ubuntu, just a little bit of information, that Ubuntu 21.04 (Impish Indri) which was released in April 2021 will soon have the end of support in January 2022, in other words, there are only a few days before support is completely discontinued by Canonical.

Also Read: Download Official ISO File – Windows 11 Insider Build 22533

Just like Windows, once terminated, there will be no more updates available and of course, this is quite dangerous, especially for security issues that might leak and endanger user data.

As a recommendation, if you are a user of 21.04 (Impish Indri) you can downgrade your system to version 20.04 LTS (Focal Fossa) which is the LTS version that has a very long support period, even End of Life itself until April 2030 later. Or if you don’t want to downgrade, you can wait until April 2022 where Canonical will release a new version, namely 22.04 LTS (Jammy Jellyfish).

So this brief information, hopefully useful.

Via: Ubuntu

Continue Reading

Linux

Linux Kernel 5.16 Brings Significant Improvements to AMD CPUs

Published

on

Linux Kernel 5.16 Brings Significant Improvements to AMD CPUs

If you are a Linux user, especially if you are also an AMD user, then you must know that in Kernel 5.16 later, there will be a significant increase in AMD Ryzen CPU performance.

Based on the outstanding benchmarks, there is an increase of 28% from the Kernel 5.15 version that was present before, you can see the following benchmark results:

Linux Kernel 5.16 Brings Significant Improvements to AMD CPUs

The benchmark above was carried out on a Lenovo ThinkPad T14s Gen2 laptop with Ryzen 7 PRO 5850U. the CPU 5850U is an octa-core processor based on the Zen 3 with 16 threads belonging to the AMD Cezanne APU lineup.

To see if the performance improvements also hold upon other Zen architectures, the Ryzen 5 5500U also did not escape the testing process, where there appeared to be a significant performance increase.

Linux Kernel 5.16 Brings Significant Improvements to AMD CPUs

Reporting from Phoronix, Phoronix speculates that the noted performance gains may be due to a combination of CPU-specific optimizations:

“This improvement with Linux 5.16 was fascinating and came unexpectedly. Linux 5.16 has many new features including AMDGPU kernel driver improvements, but this Radeon Vega graphics boost came as a surprise as there wasn’t any announced optimization and the Vega graphics support at this stage is quite mature. It may also be a combination of CPU-related improvements with Linux 5.16.” Tulis Phoronix

Well, of course, this increase will be interesting for you Ryzen CPU users, but it’s not clear whether the upgrade will be present in all Ryzen series? or any other AMD series.

What do you think? comment below guys.

Via : Phoronix

Continue Reading

Linux

How to download and install Linux Keylogger – Ubuntu Keylogger

Published

on

How to download and install Linux Keylogger - Ubuntu Keylogger

Linux servers were very useful these days, just as it is very easy to register with Linux servers, and it is very easy to use them as well.

A Linux server is a server that is run by the Linux Open Source operating system. It offers businesses an affordable option to deliver content, applications, and services to their customers.

Since Linux is open source, users also benefit from a strong community of resources and followers. Each variation of Linux server is designed with different uses :

If you have a web server running, most likely CentOS® is running.

If your application serves thousands of users or even more, the solution you will be looking for will be designed to support this type of volumes such as Red Hat® Enterprise or Ubuntu® Server.


That would be overkill for your business needs as a turnkey Linux server would suffice for a specific purpose. The cloud infrastructure is typically Linux based.

Although we can use a Linux distribution for our server (eg Ubuntu) if we wish, Linux server distributions are slightly different from desktop distributions.

For example, server versions are usually much smaller than desktop versions for each administrator to customize to their liking, they usually do not have a graphical interface by default to save resources and have optimizations and features designed to offer the highest performance, greatest stability and the best possible security.

One of the better features of Linux is Keylogger because it helps us optimize and know what’s going on when we’re not at the computer.


You may want to know if anyone has used your computer while you were away and see what the classes were doing. How do I install a keylogger for Linux?

A keylogger is a hardware device or software that silently records every keyboard input (key) made by the user.

It can be used as a bidding tool to keep track of what you write and does not lose anything you have done or saved on your computer, but it should be noted that some bad people also use it for illegal purposes like malware spyware and sending this information to third parties.

How to install Keylogger for Linux? Step by step

Log keys is an advanced keylogger software for GNU / Linux systems only. Records all characters and function keys and stores them in a log file. It can be controlled through a Linux terminal.

Install and use Logkeys

  1. Open Terminal by pressing ctrl + alt + T and hit this command to install keylogs sudo apt-get install logkeys
  2. Then enter that Choose filename.log, this will create a file filename.log in your home directory where all keystrokes will be saved.
  3. You can enter any name in place of ‘filename’.
  4. Now enter the following command – sudo logkeys – start – output filename.log
  5. This starts the application and saves your keystrokes to the name of the .log file
  6. To view the filename.log file, you must first stop the application with the following logkeys sudo – kill command
  7. And finally, read the keystrokes recorded with logkeys cat filename.log

How to install LKL?

  1. Download the APK of LKL Linux.
  2. Unpack or compress the downloaded file.
  3. Open the terminal and the CD at location lkl.
  4. Now type ./configure and press ENTER to check that all the resources you need are available.
  5. If you get any error related to the C compiler, for example: “The C compiler cannot create the executable”.
  6. For a C compiler error: sudo apt install libc6-dev.
  7. Scribe ‘ Brand ‘ and press ENTER to compile the package.
  8. Scribe ‘ sudo install ‘ and press ENTER to install the program.
  9. Installation must be completed.

How to use it?

You can send an argument with the lkl command

  1. h Support
  2. JA register port 0 × 60 (keyboard)
  3. b debug mode
  4. k set the keymap file
  5. or set the output file
  6. m send logs to
  7. t host name for sendmail. The default is localhost
  8. Example: lkl -l -k us_km -o log.file // use USA kb and put the logs in ‘log.file’

Did you manage to easily download Linux Keylogger?

Continue Reading
Advertisement

Latest

Microsoft Pulls Troubled Windows Server Update Microsoft Pulls Troubled Windows Server Update
Microsoft1 day ago

Microsoft Pulls Troubled Windows Server Update

SHARE The latest Patch Tuesday update which has been released previously is known to have caused many problems, including boot...

Microsoft Publishes Emergency Update For Windows Server Microsoft Publishes Emergency Update For Windows Server
Microsoft1 day ago

Microsoft Publishes Emergency Update For Windows Server

SHARE Microsoft has released an emergency out-of-band (OOB) update to address some of the issues caused by the Windows Update...

Former CEO Microsoft Should Separate Windows and Office Former CEO Microsoft Should Separate Windows and Office
Microsoft1 day ago

Former CEO: Microsoft Should Separate Windows and Office

SHARE A former Microsoft executive who was quite prominent in the 1990s had a crazy idea for the company, which...

Download Updates KB5010793 and KB5010795, Updates That Fix VPN Problems Download Updates KB5010793 and KB5010795, Updates That Fix VPN Problems
Microsoft2 days ago

Microsoft Releases Update KB5010791 For Windows 10 LTSC 2019

SHARE Two days ago, in addition to sending updates KB5010793 and KB5010795 for Windows 10 2004 users, and their families,...

Elon Musk revela datos sobre los teléfonos inteligentes, el universo de Twitter es indignante Elon Musk revela datos sobre los teléfonos inteligentes, el universo de Twitter es indignante
Phones2 days ago

Elon Musk Reveals Facts About Smartphones, The Twitter Universe Is Outrageous

SHARE Twitter as a community, tends to create an uproar in almost everything, even for issues that are not really...

Android 12 Now Can Turn Off 2G Network, For Device Security Android 12 Now Can Turn Off 2G Network, For Device Security
Android2 days ago

Android 12 Now Can Turn Off 2G Network, For Device Security

SHARE Android 12 was officially launched in October 2021 and several OEMs have pushed the availability of this new mobile...

Windows 10 Build 19044.1499 Released to Release Preview Channel Contains Many Fixes Windows 10 Build 19044.1499 Released to Release Preview Channel Contains Many Fixes
Microsoft2 days ago

Windows 10 Build 19044.1499 Released to Release Preview Channel Contains Many Fixes

SHARE Users who are members of the Windows Insider program are treated to a build of Windows 11 in the...

Crypto Knowing Crypto Money and How to Transaction Crypto Knowing Crypto Money and How to Transaction
Cryptocurrency3 days ago

Crypto: Knowing Crypto Money and How to Transaction

SHARE March 2020, when the Covid-19 pandemic first appeared in India, all sectors were affected by this virus. Of course,...

Microsoft Defender Exception List, Hackers Can Use To Skip Detection Microsoft Defender Exception List, Hackers Can Use To Skip Detection
Microsoft3 days ago

Microsoft Defender Exception List, Hackers Can Use To Skip Detection

SHARE Hackers could take advantage of a recently discovered vulnerability in the Microsoft Defender antivirus on Windows, to learn where...

Microsoft Confirms VPN Bug Caused By January Cumulative Update Microsoft Confirms VPN Bug Caused By January Cumulative Update
Microsoft3 days ago

Microsoft Confirms VPN Bug Caused By January Cumulative Update

SHARE Microsoft has finally confirmed a bug impacting VPNs caused by an update they rolled out as part of the...

Categories

Trending

Copy link
Powered by Social Snap