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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:05:54+00:00 2026-05-27T18:05:54+00:00

Maybe I only missed the right keywords / concept how to describe my problem.

  • 0

Maybe I only missed the right keywords / concept how to describe my problem.

Scope:

  • I’m used to build my project with JDK6 and JDK7 within Eclipse Indigo
  • For a specific library I have to use two source code versions (each specific for JDK6 or JDK7)
  • But only one exclusively at a time, because they will throw errors for wrong JDK!

Problem:

  • How to exclusively switch (or activate) a special package / file folder dependent on selected JDK/JRE within Eclipse?
  • There a no kind of C++ macros, which I’m aware of to control source code inclusion during compile time 🙂

Is there an option available in Eclipse without bypassing to ANT or other scripted build environments?

  • 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-27T18:05:54+00:00Added an answer on May 27, 2026 at 6:05 pm

    You would do this by using plugins and setting the execution environment of the plugins to depends on the desired JRE. However, the execution environment checking will enable your plugin when the execution environment satisfies (or is greater than what’s required. So specifically I recommend using a fragment so that the JRE7 code “overrides” the JRE6 code.

    The way to this is to have your JRE6 code be in your base plugin. But have the classpath of your plugin refer to a non-existent JAR file first, then then “.” (to get the code in the base plugin). Then have a JRE7 fragment that provides the JAR file with the classes to replace your JRE6 classes. (It’s otherwise not possible to have a fragment override a plugin in OSGi).

    I think this should also work correctly when test running your code using PDE in the IDE.

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

Sidebar

Related Questions

Maybe this applied to other Delphi's (I've only used 7). We've got our code
For desktop application that is. This is just a general question that maybe only
Most of you certainly use some kind of bugtracker. Maybe internally only, once a
Seriously. On a 22 monitor, it only covers maybe a quarter of the screen.
Is possible to create a spinner in HTML? Only HTML? A tag maybe? My
UPDATE: Edited javascript code. It's only slightly off now in some columns. Maybe a
The problem I just accidentally committed a change to a file that was only
I'm just stuck with a problem (maybe Simple). But I can't figure out how
hi i was wondering but maybe i missed up somenthing about htmlspecialchars() , why
It may be the case this is only possible through looping, but who knows.

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.