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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:03:54+00:00 2026-05-16T03:03:54+00:00

I have a problem wit the software I’m working on. We are accessing Windows

  • 0

I have a problem wit the software I’m working on.

We are accessing Windows system calls via JNA, and we have to define some Windows structure (Java class that extends the JNA Structure) to be able to access them.

The application has to work with 32-bit and 64-bit architecture, but the problem with the structures is that attributes in them change based on the system architecture (from int to long for example).

Is there an easy (and sane) way to do conditional compilation a-la #ifdef in Java using ant? Are there any other ways to achieve this kind of conditional #ifdef?

The other way we are contemplating is to create a general interface, create two different structures for 32-bit and 64-bit, and then handle the different case with some if-else.

Thanks.

  • 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-16T03:03:55+00:00Added an answer on May 16, 2026 at 3:03 am

    Would the Ant condition clauses not do

    http://ant.apache.org/manual/Tasks/condition.html

    UPDATE:
    I think I finally got what you’re trying to do. Looking at the javac man here I don’t think the Java compiler will let you do that, regardless of the conditions you put in Ant. Either way I found a post on stackoverflow on determining the system architecture and a thread on the sun forums that you might find helpful.

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

Sidebar

Ask A Question

Stats

  • Questions 493k
  • Answers 493k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer From a coding perspective, starting with version 3.0 of the… May 16, 2026 at 10:48 am
  • Editorial Team
    Editorial Team added an answer I gave up trying to get Stored Procedures to work… May 16, 2026 at 10:48 am
  • Editorial Team
    Editorial Team added an answer You can change you're site's url easily by adding in… May 16, 2026 at 10:48 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a particular problem that I can't seem to solve. Is it possible
I have an interesting design problem and I was hoping you all could make
Update : The problem appears to have been corrupt DLLs somewhere in my PHP
In flex 3 I have a hierarchical data structure. I would like to display
I have some servers. Some of them have ips assigned. I want to figure
So I am having this problem wit my download link. Basically my previous way
I have problem with refering to special symbol in string: I have: path='C:\dir\dir1\dir2\filename.doc' and
I have problem concerning translations in qt. All translations in my porject work fine,
I have problem with a css menu. It is correct on firefox,chrome,opera,safari and ie8.
I have problem with databinding in the Win.Forms DataGridView control. Example: public class A

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.