This is a question which will help you through what to once you have realised that after updating your Java version, NetBeans IDE refuses to launch. And even after updating your
$PATH variable in your
.bashrc file, you still find that NetBeans will not launch, and when you try and launch it through command-line with the command:
Is just gives you:
Cannot find java. Please use the --jdkhome switch.
But then when you try to specify the new
jdkhome with (
<version will be replaced with your version number, for example it could be replaced with
./netbeans-8.0.2/bin/netbeans --jdkhome jdk<version>/
You find that you have to do that each time for NetBeans to actually launch, and it is becoming rather a nuisance.
So what you actually need to do is to go to the NetBeans config file where the actual JDK home variable is set for NetBeans so that NetBeans can refer to that when starting up.