Issue
.bat scrip refuses to launch Java application on Windows 7 Pro 64 bit computers. Error message:
Windows cannot find ‘javaw’. Make sure you typed the name correctly, and then try again.
Cause
Providing JRE (Java Runtime Environment) is installed on the machine, most likely reason is that .bat script tries to find javaw.exe in a wrong location. For example it’s looking in Program Files but javaw.exe resides in Program Files(x86)
Resolution
Option 1
Open .bat script and search for javaw. Try replacing javaw with full path to the executable . For example “C:\Program Files (x86)\Java\jre7\bin\javaw.exe”
Option 2
Add javaw.exe path to PATHSystem Variable
- Computer > Properties > Advanced System Settings
- Change to Advanced tab
- Click on Environment Variables
- In System Variables section scroll down and double click on Path
- At the very end add ;C:\Program Files (x86)\Java\jre7\bin (or other valid path to javaw.exe)
Don’t forget semi column, it separates path values.
Windows 7
Windows 8
Leave a Reply