Can anyone please tell me why I get the following error when I try to run my Java programs? The programs get compiled successfully but are not able to be run. I have already set the path of Java.
C:\JavaServ>javac hello1.java C:\JavaServ>java hello1 Error: could not open C:\Program Files\Java\jre6\lib\amd64\jvm.cfg
Whenever you face the error saying Could not open jvm. cfg , it means that there was some mess happened with java installation path . Below approaches might help. If java is added in environment path, then open command prompt and type where java .
The directory server provides a means of configuring the Java Virtual Machine (JVM) and Java options for each command-line utility and for the directory server itself. The Java configuration is provided in a properties file, located at instance-dir/OUD/config/java.
Don't think if this is a correct way...(perhaps proper installation of Java is a permanent solution)....but this is a trick..:)
Delete the “java.exe” file from “c:\windows” and “c:\windows\system32″. That should fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With