Often Ubuntu Users struggle with setting up of Apache Tomcat, Hadoop and other Java Technologies.
The reason being Java Home Error.
It is Either not set or incorrectly set due to mismatch in the java variant.
The easiest way to fix this is to use the update-java-alternatives command
Whenever updating apend a /jre at the end.
The reason being Java Home Error.
It is Either not set or incorrectly set due to mismatch in the java variant.
Java Variants
The java installation in Ubuntu comes in two ways- Open Jdk
- Sun/Oracle Jdk
Always use the second one if you are working with android.
The Fix
The easiest way to fix this is to use the update-java-alternatives command
sudo update-java-alternatives -l
This will give you the java home.
Use this to java home in your config File.
Whenever updating apend a /jre at the end.
Screenshot
update-java-alternatives |
Example in this case value for Java_Home will be
/usr/lib/jvm/java-8-oracle/jre
/usr/lib/jvm/java-8-oracle/jre
No comments:
Post a Comment