When the user try to open the .jar file through command prompt, then you can encounter the following error;
Error: Could not find Java SE Runtime Environment.
Factors:
- Corrupted Registry
- Missing java path in your environment variables
- Java installation folder being removed
Example:
We can encounter this issue when we try to update Java SE to the latest version. We previously have 32 bit java installation and when we run 64 bits java installer, then our java path changed.
Solution:
For fixing this error, requires addressing one of the above problem that appropriate according to solution.
Just follow the following steps to make workable through the command prompt.
- Delete all the previous versions of java. If the java folder remains in “C:/Program Files/…’, then delete it.
- Clean up your registry.
- Go to the start menu and run again.
- Type “Regedit” in the edit file.
- Go to HKEY_LOCAK_MACHINE/Software/Microsoft/Windows/CurrentVersion/Uninstall.
- Under this uninstall folder you can find many registry entries with curly brackets.
- Click on the edit tab and then Find tab.
- Must highlight the uninstall folder before performing a search for a particular registry.
- Enter the version string as value to find corresponding registry entry to be deleted.
- When you find registry entry, highlight that key and then right-click, choose delete.
- After confirmation of delete click on Yes.