Could not open d:/java/jre1.6.0_22/lib/i386/jvm.cfg appears when java-version

Source: Internet
Author: User

Because the Java environment variable is configured with JDK1.5.0_17, the 1.6.0_22 information appears when you run Java-version.

Based on the above information to guess before not completely uninstall the 1.6.0_22 of the directory, so go to see the previous installation directory, found that there is indeed jre1.6.0_22 this directory, after the deletion of the directory, again run java-version after the following error message appears:

Could not open d:/java/jre1.6.0_22/lib/i386/jvm.cfg

According to the online search data summarized as follows:

1, the general JDK installation will be completed after the Java.exe,javaw.exe,javareg.exe (but this file I did not find) copy to the Windows/system32 directory, to ensure that any user can use Java.exe to start the JVM.

2, will generate several registered file items

Hkey_local_machine/software/javasoft/java Development Kit
Hkey_local_machine/software/javasoft/java Plug-in
Hkey_local_machine/software/javasoft/java Runtime Environment

The Java.exe is determined at startup by the following method:
If there is. /jre/bin/java.dll file, find ... /jre/lib/jvm.cfg file in which the 1th listed Jvm.dll type is the default (if Jvm.dll type is specified on the Java.exe command line, the specified type is used). The types of Jvm.dll are divided into three hotspot,classic,server. If it doesn't exist. /jre/lib/jvm.cfg file, print the error message you said.

According to the description above, I will delete the relevant files in the Windows/system32 directory, and then copy the 1.5.0_17 version of several EXE files, again run java-version in the command line, the correct display of the 1.5.0_17 version information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.