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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:53:22+00:00 2026-06-10T14:53:22+00:00

I have a batch file in which I set the ant path and junit

  • 0

I have a batch file in which I set the ant path and junit path values hard coded and it executes my build.xml and everything works fine.

When I replace the hard coded value of the path with something like
set Path=%CURRENT DIRECTORY%\bin
it is not working.

How to make this work.

Here is my batch file

set CURRENT_DIRECTORY=%~dp0

set ANT_HOME=c:\ant\apache-ant-1.8.3
ECHO current directory is %CURRENT_DIRECTORY%
ECHO %ANT_HOME%
set Path=%ANT_HOME%\bin
set ADAPTER_LIBRAY_PATH=%1
set USER_JAR_PATH=%2
set CLASS_NAME=%3
set RESULTS_PATH=%4
set JUNIT_PATH=C:\ANT\test\junit-4.1.jar
set LIBRAIES_TO_INCLUDE="%JUNIT_PATH%";"%ADAPTER_LIBRAY_PATH%";"%USER_JAR_PATH%"
ECHO %LIBRAIES_TO_INCLUDE%
ECHO %ADAPTER_LIBRAY_PATH%
ECHO %JUNIT_PATH%
ECHO %USER_JAR_PATH%
ECHO %CLASS_NAME%
ECHO %RESULTS_PATH% 

ant -lib "%LIBRAIES_TO_INCLUDE%" -Dlibraries="%ADAPTER_LIBRAY_PATH%" -Djunitlibrary="%JUNIT_PATH%" -Djartobeexec="%USER_JAR_PATH%" -Duserclass=%CLASS_NAME% -Dresultspath=%RESULTS_PATH% -buildfile build.xml test-html
  • 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-10T14:53:23+00:00Added an answer on June 10, 2026 at 2:53 pm

    Try this:

    SET ANT_HOME = ant_directory
    “%JAVA_HOME%\bin\java” -Xmx512M -XX:MaxPermSize=256M -cp %ANT_HOME%/lib/ant-launcher.jar -Dant.home=”%ANT_HOME%” -Dant.library.dir=”%ANT_HOME%/lib” org.apache.tools.ant.launch.Launcher -f build.xml %*

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

Sidebar

Related Questions

I have a batch file which takes as an argument a file path set
I have a windows batch file, which outputs directory path, e.g.: @echo c:\windows I
I have a batch file which initializes variables via SET inside a for loop,
I have a Batch file which will call a Powershell Script : BATCH FILE
I have a problem. I have a batch file which imitates the UNIX cd
I have created a batch file which automatically copy a .sql file to the
I have a windows batch file in Windows 7 which does something with find.
I have a batch file that requires the user to enter a file path.
I have this batch file which needs to do some stuff in a folder.
i have the following batch file, which terminates the iTunes program so, that if

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.