JDK Error while Starting and Connecting to Oracle GoldenGate Studio 12c

[oracle@oraprm/bin] cd $GG_HOME
[oracle@oraprm/bin] pwd
/u01/oracle/product/12.1.0.2/gg_home/oggstudio/bin

[oracle@oraprm/bin] ./oggstudio

Type the full pathname of a JDK installation (or Ctrl+C to quit), the path will be stored in /home/oracle/.oggstudio/12.2.1.2.0/product.conf

[oracle@oraprm/bin]  which javac
this will show JAVA Paths

Go to "product.conf"

[oracle@oraprm/bin] cd /home/oracle/.oggstudio/12.2.1.2.0

[oracle@oraprm/bin] gedit product.conf

In "product.conf" set parameter to latest Java Version

SetJavaHome /usr/java/latest

Save the File

[oracle@oraprm/bin] cd $GG_HOME
[oracle@oraprm/bin] pwd
/u01/oracle/product/12.1.0.2/gg_home/oggstudio/bin

[oracle@oraprm/bin] ./oggstudio

OR

[oracle@oraprm/bin]cd $HOME
[oracle@oraprm]gedit .bash_profile
export JAVA_HOME = /usr/java/latest

[oracle@oraprm/bin] cd $GG_HOME
[oracle@oraprm/bin] pwd
/u01/oracle/product/12.1.0.2/gg_home/oggstudio/bin

[oracle@oraprm/bin] ./oggstudio

How to fix: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

Open your terminal and type mysql -u root -p Enter your password. Hopefully your MySQL is logged in now.