I'm unable to launch eclipse after I messed up with Current and CurrentJDK by executing following commands from post Can't get Maven to recognize Java 1.8
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm Current
sudo ln -s /Library/Java/JavaVirtualMachines/<installed_jdk_version>.jdk/Contents Current
sudo rm CurrentJDK
sudo ln -s /Library/Java/JavaVirtualMachines/<installed_jdk_version>.jdk/Contents CurrentJDK
I also tried to reinstall java. But installer is terminating without completing or without giving any error. Please help as I'm completely stuck due to this.