Why do I get Error: could not open `C:\Program Files\Java\jre7\lib\i386\jvm.cfg
In this post, I will take a problem solution approach.
Problem:
While executing a jar from command line or while executing a java command to run any program, following error get displayed.
"Error: could not open `C:\Program Files\Java\jre7\lib\i386\jvm.cfg"
Solution 1:
Check the PATH environment variable.
Make sure, it consist of path to bin directory of your Java JDK installation.
Example path upto bin : C:\Program Files\Java\jdk1.7.0_71\bin
If the variable is not as above, do change it appropriately. If you don't know how to change the value,
please refer this post.
Make sure you restart your command prompt after you newly set the variable. Otherwise, changes will not come in effect.
Solution 2:
While doing Java installation, following 3 files get copied to C:\Windows\System32
Hope either of above solution works for you.
Problem:
While executing a jar from command line or while executing a java command to run any program, following error get displayed.
"Error: could not open `C:\Program Files\Java\jre7\lib\i386\jvm.cfg"
Solution 1:
Check the PATH environment variable.
Make sure, it consist of path to bin directory of your Java JDK installation.
Example path upto bin : C:\Program Files\Java\jdk1.7.0_71\bin
If the variable is not as above, do change it appropriately. If you don't know how to change the value,
please refer this post.
Make sure you restart your command prompt after you newly set the variable. Otherwise, changes will not come in effect.
Solution 2:
While doing Java installation, following 3 files get copied to C:\Windows\System32
- java.exe
- javaw.exe
- javaws.exe
Hope either of above solution works for you.
Comments
Post a Comment