How can i install oracle java 8 in ubuntu 18.04? I have been on the process since morning and each attempt I get this error message "has no installation candidate"

Application Name: Replace this text with one of: Platform, Reference Application, Bahmni, (Other – Please specify) Version Number: Replace this text with the version number of the above application your question is about.

Question: Replace the following text with your question or problem. If applicable, describe your problem in detail. If you are getting an error message, provide step-by-step instructions for others to reproduce the problem, if possible. Describe what steps you have taken to try to resolve the problem. Include version numbers of related add-on modules, any specific error messages, and if applicable, specific steps to reproduce your problem. Ask OpenMRS is for questions about installing, configuring, and using OpenMRS software products. If you have development problems, please use the “Development” category.

Hi, are you trying to install OpenJDK 8 or Oracle JDK?

if the error continue to exist, you can uninstall it and specifically for Ubuntu, its better to understand which jdk version will suit your needs. forexample jdk8 as you have said will siut, then after installing it on your machine, verify the java installation using command line, again setup the JAVA-HOME and JRE variable on the classpath. But j hope your problem doesnot include installation of Reference Application current version. why am j saying this because you will get the same problem if you have the version of JDK especially jdk 10 and above, to run the reference application 2.9.0. currently reference application is best suited in jdk 8.0.1 version. thanks

1 Like

@rolex , you didnt answer @sanjula’s question . are you installing oracle jdk or open jdk??

Good morning. Thanks you for the guide, I will try it now.

Regards

Good morning, I want to install ORACLE JDK8. Thanks

1 Like

oracle jdk is currently no longer supported ,unless a client subscribes for a payed licence, otherwise instead try openjdk

Oracle JDK8

Try to google how to install openjdk 8 instead.

Thanks for your suggestion, but openjdk8 is not working with the version of openmrs am working with. I tried a whole lots b but to no avail. Oracle JDK like I was informed by one of the openmrs community member, can only support a license oracle jdk. Thank you for the contribution

Alright, so if you want to install OpenJDK 8, try the following commands in the terminal.

sudo apt install openjdk-8-jdk

Check whether it has actually been installed using:

java -version

If there is an error during or after this, please upload a screenshot of the error here so we can see what we can do about it.

If you want to install Oracle JDK 8, then type in the following commands in the terminal.

sudo add-apt-repository ppa:webupd8team/java

Press Enter if prompted.

Once that is complete, then update the package list using:

sudo apt update

After that, we can install Oracle Java 8 using:

sudo apt install oracle-java8-installer

Check whether it has actually been installed using:

java -version

Like I said before, if there is an error during or after this, please upload a screenshot of the error here so we can see what we can do about it.

Like @mozzy said here, I suggest installing OpenJDK 8 or higher instead of Oracle JDK because it is not being supported anymore. @rolex hope you find the information useful and hoping the issue will be resolved soon. Have a good day!

Contribution appreciated, thank you very much sir.

I have tried all this process but to no avail. Thank you