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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:06:43+00:00 2026-05-31T21:06:43+00:00

I have an ant script with the following header: <project name=Simple ActiveJDBC Example default=clean

  • 0

I have an ant script with the following header:

<project name="Simple ActiveJDBC Example" default="clean" basedir=".">

And then somewhere below:

<target name="compile" depends="clean">
     <javac srcdir="src" destdir="${classes}" debug="on" optimize="off" deprecation="off" includeantruntime="false">
          <classpath refid="compile_classpath"/>
     </javac>
</target>

Eclipse it seems searches for the src directory in the ‘wrong’ location! Since this script works perfectly fine when running the ant build from the command prompt. I am no ant expert but this thing is just driving me nuts 🙂 Any ideas? Here’s the error that I get for the above code where src is specified:

C:\Users\Nupul\Documents\MyProject\ActiveJDBC\ant-example\build.xml:50: 
srcdir "C:\Users\Nupul\workspace\Simple ActiveJDBC Example\src" does not exist!

As you can see the build.xml file is located in the upper path but eclipse seems to somehow search in the workspace directory and that too with the project name in the xml file and NOT in the directory where it’s located!! I have absolutely no idea how to override this behavior.

All paths are correctly handled in the xml (as observed if you hover over the <pathelement> elements). However, I have no idea why this works from the command prompt but fails in eclipse.

The Ant Builder options for eclipse is configured to ‘run in the same JRE as the workspace’ but not sure if that’s the culprit.

Even if I change the it to src = ${basedir}/src I get the same error for files referred in the ‘other’ path element tags!

Any ideas?

PS: I’m trying to compile the simple-ant example for the ActiveJDBC project – but via eclipse 🙂

  • 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-31T21:06:44+00:00Added an answer on May 31, 2026 at 9:06 pm

    Found it – seems when you Right Click > Properties > Builders > “Your ant builder” and then click Edit you’ll get variables as ${workspace_loc} in the path of the ant file and base directory – this will happen if you chose to ‘browse’ for these files from the ‘workspace’ instead of ‘file system’

    If the project is created in/by the workspace, go with the former else if it’s imported make sure your files are selected from the ‘file system’

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

Sidebar

Related Questions

I have a very, very simple any build script: <project name=quiz_jar default=all> <target name=all>
I have the following Ant build file: <?xml version=1.0 encoding=UTF-8?> <project default=build name=MyAntScript> <!--
I have a Java project that I build using an Ant script. I am
I have the following use case: My application is started with an Ant Script,
I have the following ant script that I can't seem to find a way
I have the following snippet in my Ant script. It executes just fine: <exec
I have an Ant project that uses a bit of Coffee Script. I would
I have following target in mz ant script to build my java application <target
I have an ant script that does a headless build using the following ant
I have an ant build script that errors out with the following message. javac

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.