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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:22:44+00:00 2026-06-17T23:22:44+00:00

There are certain compiler dependencies that are not allowed in our (Java) environment. We

  • 0

There are certain compiler dependencies that are not allowed in our (Java) environment. We have two servers, call them Application and Process. We have three root Java packages, call them Application, Process, and Shared. Application and Process are not allowed to reference each other, but they can each reference Shared. Shared can reference any class in any of the other two packages. How can I enforce these dependencies with Ant? The problem, as you might guess, is that in our Eclipse based environment everything compiles successfully, but we’ve come across runtime errors where a class is not there (since we have multiple servers).

I have attempted quite a few things but nothing has worked. See my current attempt below, where I have omitted irrelevant code for clarity. Comments are included.

<!--Compile the 'shared' directories. Since shared depends on Application and Process, we compile everything then delete Application and Process later. -->
    <javac srcdir="${src.dir}" destdir="${build.dir}">
        <classpath>
            ...
        </classpath>
      </javac>


<delete dir="${build.dir}/application" />
<delete dir="${build.dir}/process" />

<!--Compile the 'application' directories -->
<javac sourcepath="" srcdir="${src.dir}/application" destdir="${build.dir}">
    <classpath>
        <pathelement location="${build.dir}/shared" /> 
        ...
    </classpath>
  </javac>

<!--Compile the 'process' directories -->
<javac sourcepath="" srcdir="${src.dir}/process" destdir="${build.dir}">
        <classpath>
            <pathelement location="${build.dir}/shared" /> 
            ...
        </classpath>
  </javac>
  • 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-06-17T23:22:46+00:00Added an answer on June 17, 2026 at 11:22 pm

    you need to split shared into three parts, shared-standalone, shared-application and shared-process.

    compile shared-standalone first,

    compile shared-application together with application,

    compile shared-process together with process.

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

Sidebar

Related Questions

There are certain classes, such as Closeable , File and Container , that have
Is there a way to tell the Java compiler to not complain about a
Using Codesourcery arm-linux-eabi crosscompiler and have problems with the compiler not executing certain code
There are certain parts of my UserEntity that I would like to be able
Is there a certain type of SQL field that acts as a sequential number
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
A compiler that implements the OpenMP standard may, but is not obliged to, exploit
Suppose you have two static libraries A and B such that A references methods
I admit that I asked a question about why Closure Compiler does not shorten
While doing concurrent programming I need to tell the compiler/optimizer that it may not

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.