After years of working OK, I\'m suddenly getting this message when trying to start the JVM:
Error: could not open `C:\\Program Files\\Java\\jre6\\lib\\amd64\
Reinstalling java didn't help me. But the trick to put the JAVA_HOME variable at the beginning of the env-vars. The problem occoured after an upgrade from jdk1.7.0_11 to jdk1.7.0_13
C:\ProgramData\Oracle\Java\javapath
I took a back up of the files in it and removed those files from there. Then I opened a new cmd prompt and it works like a charm.
I had a similar problem (trying to start a Jenkins slave agent on Windows) on Windows 2008R2
, Java 1.7.0_15
I had two situations that contributed to the problem and that changing both of them fixed it:
1) Installing Java
in a unix
-compatible path (changing from c:\Program Files\... to c:\Software\...
); I don't think this directly affected the problem described in this thread, but noting the change;
2) Running Java
not through a shortcut. It originally failed with a shortcut, but re-running
from the direct executable (C:\Software\Java...\bin\java
) worked.
Another workaround is using shortpath in windows:
c:\
dir program* /x
PROGRA~2
C:\PROGRA~2
is same as C:\Program Files (x86)
JAVA_HOME
replace path to :
C:\PROGRA~2\Java\jre7
This should work in windows 64 environment as it worked for me in win7 64bit version.
I had this problem after updating your java. The best way to solve this problem is just go to your c:/ProgramFiles/Java
folder. There you will find two jre folders one is as jre.your version and other with exactly like jdk folder. Try to remove jre.1.your version folder. There you go your problem is solved. Hope this might help. It's worked for me.
It wasn't in the path. Finally fixed by uninstalling java, removing all references to it from the registry, and then re-installing. None the wiser, but back working again. Thanks all @Highland Mark- Can you tell me the process to removing references from registry. I tried all possible way people mentioned here, nothing worked.