The keystore is : jre/lib/security/cacerts . You can list its contents by:
keytool -list -keystore java.home/jre/lib/security/cacerts -v
To find JAVA_HOME, issue this command:
sudo apt-get install galternatives
And then run that program.
But, it sound to me like you dont need to alter the keystore. What you need to do is edit the .policy file. It's easy to find at:
java.home/jre/lib/security/java.policy
Of course, if you still cant find it then it is easy to derive with this command:
sudo find / -name "java"
Actually all these PPAs are from third parties. Oracle does not provide any PPA, and the manual way of installing Oracle JDK 8 is explained in step by step manner in this article :
Install Latest Oracle JDK in Ubuntu
Step 1:
Download the latest JDK(jdk-Xuxx-linux-xXX.tar.gz) from this official link.
Step 2:
Open the terminal (Ctrl + Alt + T) and enter the following command.
sudo mkdir /usr/lib/jvm
Step 3:
Enter the following command to change the directory.
cd /usr/lib/jvm
Step 4:
Extract the jdk-Xuxx-linux-xXX.tar.gz file in that directory using this command.
sudo tar -xvzf ~/Downloads/jdk-8u45-linux-x64.tar.gz
Step 5:
Enter the following command to open the environment variables file.
sudo -H gedit /etc/environment
Step 6:
In the opened file, add the following bin folders to the existing PATH variable.
/usr/lib/jvm/jdk1.8.0_45/bin
/usr/lib/jvm/jdk1.8.0_45/db/bin
/usr/lib/jvm/jdk1.8.0_45/jre/bin
The PATH variables have to be separated by colon.
Notice that the installed JDK version is 1.8 update 45. Depending on your JDK version, the paths can be different.
Add the following environment variables at the end of the file.
J2SDKDIR="/usr/lib/jvm/jdk1.8.0_45"
J2REDIR="/usr/lib/jvm/jdk1.8.0_45/jre"
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_45"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_45/db"
The environment file before the modification:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
The environment file after the modification:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk1.8.0_45/bin:/usr/lib/jvm/jdk1.8.0_45/db/bin:/usr/lib/jvm/jdk1.8.0_45/jre/bin"
J2SDKDIR="/usr/lib/jvm/jdk1.8.0_45"
J2REDIR="/usr/lib/jvm/jdk1.8.0_45/jre"
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_45"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_45/db"
Best Answer
Open a terminal (ctrl+alt+t):
This will install the folowing packages:
Now to
maven
:This will install the folowing packages: