try using this command in the terminal:
sudo apt install default-jre
then you can try using:
java -version
to check version
Answer from neoMidori on askubuntu.comHow do I install Java JRE on Linux?
Where is Java/the JDK installed on Linux?
How do I install Java?
Help getting started developing in linux
Java is a write once, run anywhere language, meaning you don't need anything special other than the JDK and a Linux compatible IDE.
For the JDK you can either use OpenJDK (An opensource implementation of Java / JDK) or Oracle's JDK (Original and most used JDK). OpenJDK is easily available through sources like Ubuntu's Software Centre whereas Oracle's JDK is a bit more painful to install (Depending on the distro), but this is a great resource to make it easier (For Debian based systems like Ubuntu).
As for an IDE you're already on the right track. Both Eclipse and IntelliJ are great options and have cross-platform support.
More on reddit.comVideos
try using this command in the terminal:
sudo apt install default-jre
then you can try using:
java -version
to check version
Do not download binaries straight from the Internet. That is not how to install software on Linux. It is how Windows users do it, but it is wrong on Linux.
Install it from the package manager. Google for instructions for your version, since you did not bother to tell us what you are running. Without detailed specific info we can't help you.
I followed the instructions on the Java official website but when I tried to run some thing related to JRE on the terminal it says Java not found