Failed to start Jenkins after updating java

We encountered this issue after updating java on our build server. In our case we updated from Java 7 Update 80 to Java 8 update 111 ( a major version change) which you can guess changed the directories. Since the installer asked to remove older version of java, we did it. As you can guess, this left dependent applications unable to start as they were not able to find java files in the requisite folder anymore. Now while trying to run jenkins, we were getting below error:

Service cannot be started. System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
 at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
 at winsw.WrapperService.StartProcess(Process process, String arguments, String executable)
 at winsw.WrapperService.OnStart(String[] _)
 at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

If you have been following jenkins.exe earlierRead More »