Windows 7 ERROR: could not open E:\java\jre7...jvm.cfg --- I canged it to C:\.... but still same problem

Floods7

New Member
Joined
May 12, 2009
Messages
44
Hey guys, I haven't posted here in a while but here goes...

When I run this certain program which is made in java, it says "Error: could not open E:\java\jre7\lib\i386\jvm.cfg"

Now when I check my environment Variables I have JAVA_HOME set to C:\Program Files\Java\jre7\lib\amd64\jvm.cfg

and I have Path in System Variables set to C:\Program Files\Java\jre7\lib\amd64\jvm.cfg;


when I check in CMD : I get the following
-------------------------------
C:\>java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
-----------------------


What am I missing here??
 
Solution
It seems like the error you are encountering when running your Java program is related to the path to the Java Runtime Environment (JRE) configuration file. The error message specifically mentions not being able to open the jvm.cfg file located at E:\java\jre7\lib\i386\jvm.cfg. From your provided information, it looks like your JAVA_HOME and Path environment variables are set to a different location than where the program is trying to access the JRE configuration file. Here's a breakdown of the details:
  • JAVA_HOME:
    • Currently set to: C:\Program Files\Java\jre7\lib\amd64\jvm.cfg
    []Path:
    • Currently set to: C:\Program Files\Java\jre7\lib\amd64\jvm.cfg The output of...
It seems like the error you are encountering when running your Java program is related to the path to the Java Runtime Environment (JRE) configuration file. The error message specifically mentions not being able to open the jvm.cfg file located at E:\java\jre7\lib\i386\jvm.cfg. From your provided information, it looks like your JAVA_HOME and Path environment variables are set to a different location than where the program is trying to access the JRE configuration file. Here's a breakdown of the details:
  • JAVA_HOME:
    • Currently set to: C:\Program Files\Java\jre7\lib\amd64\jvm.cfg
    []Path:
    • Currently set to: C:\Program Files\Java\jre7\lib\amd64\jvm.cfg The output of java -version command confirms that the Java version being used is "1.7.0_21" with the 64-bit Server VM. To resolve the issue, you should ensure that the program you are trying to run is using the correct Java installation path. It seems to be expecting the Java installation in the E:\java\jre7\lib\i386\ directory. Here are a few steps you can take to troubleshoot and potentially fix this issue:
      1. Check Program Configuration:
      [
    • ]Verify the configuration of the Java path within the program itself to ensure it points to the correct JRE location.
  1. Adjust Environment Variables:
    • Update your JAVA_HOME and Path environment variables to match the expected path (E:\java\jre7\lib\i386). This change should reflect the directory where the program is searching for the jvm.cfg file.
    []Verify Installation:
    • Check if there are multiple Java installations on your system that might be causing conflicts. Ensure that the desired version of Java is properly installed.
    [
    ]Path Resolution:
    • Confirm that the java.exe and related files are located in the specified Java installation directory. By aligning the program's expected Java path with the actual Java installation on your system, you should be able to resolve the error you are encountering. Let me know if you need further assistance or clarification on any of these steps!
 
Solution