javaw.exe isn't running as an executable

17,490

I had the same issue on my machine. Check your Windows Path variable. My path linked Java via C:\ProgramData\Oracle\Java\javapath and that folder contained symlinks to the actual executables located under C:\Program Files\Java\jre1.8.0_45\bin. I deleted the the C:\ProgramData\Oracle\Java\javapath entry and replaced it with C:\Program Files\Java\jre1.8.0_45\bin then everything started working.

Notice however, that the 'correct' directory has a version number, so anytime Java is updated, you'll have to change the Path again. I suspect this was the reason for the other directory.

EDIT: Instead of deleting the path entry, you can 'fix" the symlinks in the javapath directory with this command (it makes them hard links):

mklink /H C:\ProgramData\Oracle\Java\javapath\java.exe C:\Program Files\Java\jre1.8.0_45\bin\java.exe 

Use that command to fix all three links:

  • java.exe
  • javaw.exe
  • javaws.exe

This has also worked for me

Share:
17,490

Related videos on Youtube

Drew Stewart
Author by

Drew Stewart

I'm just a simple guy, out to help the world in small ways. I have experience with Linux, Android, and Windows.

Updated on September 18, 2022

Comments

  • Drew Stewart
    Drew Stewart over 1 year

    I am using Windows 7 Ultimate x64, SP1 and latest updates are installed. Any time I attempt to open a Java application, I receive a dialog asking what program I want to open javaw.exe with. This problem first appeared while I was using version 8 update 31. Updating to update 45 did not fix the problem. Is there a method to fix this?

    • Karan
      Karan about 9 years
      "Any time I attempt to open a Java application" - Do you mean any time you double-click a JAR file?
    • Drew Stewart
      Drew Stewart about 9 years
      That isn't directly the issue, although any .jar files don't appear when opened, if they're opening. Applications that use Java (my example is Yawcam, a webcam photography program) don't open and instead show the "Choose application..." dialog.
    • Karan
      Karan about 9 years
      Try JavaRa to completely uninstall all JRE versions, reboot and install the latest one. See if that helps.