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 4557526
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:31:17+00:00 2026-05-21T17:31:17+00:00

I am writing a launcher in C++ to launch my java based GUI application

  • 0

I am writing a launcher in C++ to launch my java based GUI application on Windows. I am using CreateProcess to launch “javaw.exe”. Everything works except for the fact that 32-bit version of “javaw.exe” is always launched.

When java is installed, it puts the executables “java.exe” and “javaw.exe” in %windir%\System32 on 32-bit windows. On 64-bit windows, it puts the same executables in %windir%\SysWow64.

There are 3 possibilities:

  1. 32-bit launcher executed on 32-bit windows: %windir%\System32 is in search path, and 32-bit javaw.exe is found. The GUI launches. Everything works.

  2. 32-bit launcher executed on 64-bit windows: %windir%\System32 is in search path. %windir%\System32 is redirected to %windir%\SysWow64 (since my launcher is 32 bit in this case). 32-bit javaw.exe is found. The GUI launches. Everything works.

  3. 64-bit launcher executed on 64-bit windows: %windir%\System32 is in search path. No redirection happens. It does not contain the executable javaw.exe. The launcher fails.

How do I launch 64-bit javaw.exe in the third case?

  • 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-21T17:31:17+00:00Added an answer on May 21, 2026 at 5:31 pm

    I finally found a solution (by digging through various posts on stackoverflow).

    Recent versions of JRE when installed do put a copy of “javaw.exe” in System32. The previous versions of 64 bit JRE probably didn’t (not sure).

    In any case, the registry key HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Runtime Environment has a property CurrentVersion which points to the key for the default JRE for the system. The sub-key corresponding to the version number has a property JavaHome which points to the location of JRE installation.

    If JRE/JDK is not installed, then the Java Runtime Environment key won’t be found.

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

Sidebar

Related Questions

I have been writing a small java application (my first!), that does only a
Writing something like this using the loki library , typedef Functor<void> BitButtonPushHandler; throws a
Writing my first Linq application, and I'm trying to find the best way to
I've inherited a Java web-services code-base (BEA/Oracle Weblogic) and need to start/launch an external
I'm attempting to launch an instance of the VideoLAN program from within a java
I'm having a strange problem with the following code, I'm writing a game launcher
What happens exactly when I launch a .NET exe? I know that C# is
I'm currently writing a GWT application through Eclipse. Eclipse is used for development but
I've created several bash aliases in Git Bash on Windows, to launch executables from
I am writing an android application for sending email which launches the default mail

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.