Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4234778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:24:16+00:00 2026-05-21T02:24:16+00:00

How do I persuade Windows to use the JDK instead of a JRE? This

  • 0

How do I persuade Windows to use the JDK instead of a JRE?

This question has been asked before, here and elsewhere:

How do I set the default Java installation/runtime (Windows)?

The trouble is that Windows ignores JAVA_HOME and it also ignores the fact that I made the JDK bin directory the first entry in the path.

When I run java -version from the command line, instead of invoking my JDK 1.6 installation, it runs the 1.7 JRE.

My guess is that this is a problem specific to 1.7, and Windows 7 is doing something it shouldn’t with the registry.

Any ideas on how to fix this?

Edit: Oops. I wrote “first entry in the classpath” above, when I meant “path”. Sorry.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:24:16+00:00Added an answer on May 21, 2026 at 2:24 am

    On Windows, the same java executable can load DLLs for different versions of Java. It looks at the directory from which it’s running to see if it contains libraries for a particular version of Java. If not, it uses the Windows Registry to locate the default version of Java for the system.

    The Java installer will put a copy of java.exe (but no libraries) in the the Windows\system32 C:\Program Files (x86)\Common Files\Oracle\Java\javapath directory, and add that directory to the beginning of the PATH variable.

    If you don’t use a full path, the copy of java.exe to run is found by using the PATH system variable. Since this directory doesn’t contain the DLLs of a particular Java runtime version, one is located one by looking at the registry.

    So, you either need to modify the registry, or replace the javapath entry with the version of Java you want in your PATH system (not user) variable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(This question has been downvoted, which I find strange. How have I offended?) Am
Is there any way to persuade Eclipse to use tabs instead of spaces for
On this site , I have a search form whose submit button has a
I've got a legacy app here that has a few 'time-consuming' loops that get
I am trying to use the DateTime picker custom gridview column type from this
Can I persuade operator>> in C++ to read both a hex value AND and
I'm trying to persuade a SiteMesh decorator to change the content-type of the response,
At my new gig, they use Ant and cannot be persuaded to move to
I'm writing a windows application in c#,FW3.5 & Visual Studio 2008. I need to
I would persuade a friend me that using Using Database Components (DB Aware Controls)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.