Check the version?

How can I check whether Python/Java is installed on my System and which version is installed ?? Because before moving to Zorin OS, I had installed both of these..

In terminal:

python --version
java -version

Python is installed.

But should I install Java from its official website or directly by the command given by the terminal ?

java --version

Command 'java' not found, but can be installed with:

sudo apt install default-jre            
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless

I have some experience with Python to managed my troops of RaspberryPi at home. But I have zero experience with Java. I hope other members @Aravisian @337harvey @zabadabadoo who have more experience could help you.

Do you develop software? That is the main reason to have openjdk on your system. Most software (snap and flatpak) include all dependencies to run. As you install software on your system, apt or .deb packages, dependencies will be installed with automatically (apt) or manually (.deb). Read all output and don't be click lazy.

Java is interesting in that to find the version you must use:

java -version

This is different from most where it is

"Program-Name" --version

I am not sure why this is. But it helps to know for future reference.

The first question is, should you install Java? Unless you have software that specifies a need for it; then I would not recommend installing it.

The next question is whether to install from Oracle or from Repo. These days, either. the sudo apt install default-jre should suit your needs if you need it.
In Zorin 12.4 and in 15.3, I would have recommended that it be installed directly from the Oracle Website as the Ubuntu Main Universe version contained a bug that was quite a problem. In Zorin 16 (Based on Ubuntu 20.04) that has been fixed and is not an issue at this time.

I did not eve give it a thought till you point out!
It is indeed true.

I usually expect an abbreviated argument after single hyphen and a full argument after double hyphens. For example, -h and --help.

2 Likes