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

  • Home
  • SEARCH
  • 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 1039607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:07:16+00:00 2026-05-16T15:07:16+00:00

I am trying to call native executables from java program. I have three exe

  • 0

I am trying to call native executables from java program. I have three exe files one for win32, other linux 32-bint and third linux 64-bit, now before I can call the right executable I need to determine which platform program is running on. I can determind Operating system by simply getting “os.name” System property, but not sure how to get determine if it is 32-bit or 64-bit platform?

  • 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-16T15:07:17+00:00Added an answer on May 16, 2026 at 3:07 pm

    Here are some relevant System properties with the values on my machine:

    os.arch:                 x86
    os.name:                 Windows Vista
    sun.arch.data.model:     32
    

    From this information, you should be able to guess something like this:

    String osName     = System.getProperty("os.name").toLowerString();
    String dataModel  = System.getProperty("sun.arch.data.model");
    
    boolean isWindows = osName.startsWith("windows");
    boolean isLinux   = osName.startsWith("linux"); // or whatever
    boolean is32bit   = "32".equals(dataModel);
    boolean is64bit   = "64".equals(dataModel);
    
    if(isWindows && is32bit){
        call32BitWindowsLib();
    }
    
    //etc.
    

    For a completer reference, see:

    • System.getProperties()
    • When writing Java code, how do I distinguish between 32 and 64-bit operation?
    • How can I tell if I’m running in 64-bit JVM or 32-bit JVM?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to call a java method from native C code in an Android
I am trying to call native functions from the ApplicationServices framework on a mac
I'm trying to call a function present in one class from another class by
I am trying to call c# function from javascript the code i have tried
I'm trying to call a native function from a managed assembly. I've done this
I am trying to use a C++ dll from a native program. I am
I'm trying to access a particular native Windows API call from within a node.js
I am trying to call a private method from within the native implementation of
I am trying to call a stored procedure using native query call from an
I'm trying to get a simple Java method call from C++ while Java calls

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.