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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:22:31+00:00 2026-06-18T19:22:31+00:00

I tried setting the Path variable in ant exec task using this link. But

  • 0

I tried setting the Path variable in ant exec task using this link. But its not working somehow. I am trying to add THRIFT_HOME which is set to basedir currently and I have the thrift.exe file in the basedir.

Also, when I change executable attribute value to thrift.exe, the thrift compiler works properly but the basedir is not added to the Path.

<exec executable="thrift">
    <env key="Path" value="${env.Path};${THRIFT_HOME}" />
</exec>

I also tried using the setx command as:

<exec executable="setx">
    <arg value="Path"/>
    <arg value="%Path%;${THRIFT_HOME}"/>
</exec>

but it still does not work.

Any help would be appreciated!

  • 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-18T19:22:32+00:00Added an answer on June 18, 2026 at 7:22 pm

    I am currently using on Windows 7 and the problem was with spaces in the folder name. That’s a big problem when working on Windows.

    I tried placing the thrift executable at /d/thrift/ and it worked and assigning THRIFT_HOME = /d/thrift. Then I tried /d/thrift demo/ and there is the problem.

    D:\noknok_fido_to_ostp\noknok_fido_to_ostp_workspace\Demo\build.xml:33: Execute failed: java.io.IOException: Cannot run program "thrift-0.9.0.exe": CreateProces
    s error=2, The system cannot find the file specified
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
            at java.lang.Runtime.exec(Runtime.java:593)
            at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
            at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
            at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
            at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
            at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
            at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:392)
            at org.apache.tools.ant.Target.performTasks(Target.java:413)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.Main.runBuild(Main.java:811)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
            at java.lang.ProcessImpl.create(Native Method)
            at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
            at java.lang.ProcessImpl.start(ProcessImpl.java:30)
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
            ... 23 more
    

    Another problem is that /d/thrift doesn’t work in Eclipse Ant plugin build. I tried it using command prompt and the build was successful.

    This teaches a new lesson: Always build from command prompt!

    Thanks to all who answered for this question.

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

Sidebar

Related Questions

I have tried setting the debug flags using the set command in cmake but
I guess this is kind of an odd question but I have tried setting
I've tried setting my PROMPT_COMMAND variable: PROMPT_COMMAND='echo -ne \033]0;myWindowTitle\007' but something changes my tab
I tried setting the defaultvalue property of the field to Guid.NewGuid() but every item
Appears that WAS does not support the integration binding. I've tried setting it up
I tried doing this: [toolbar setTint:[UIColor colorWithPatternImage:[UIImage imageNamed:@thingFromMyBundle.png]]]; but it just ended up black.
I'll prefix this question with: No, Setting IRONPYTHONPATH is not the answer. Anyway... I
Sencha Cmd using Compass.app for Windows, what is the Environment Variable PATH - to
I tried setting all possible styles to something other than grey, just to try
I have tried setting a line-height for sIFR3 in both the sifr-config.js and my

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.