Link to home
Start Free TrialLog in
Avatar of rot299
rot299

asked on

cfexecute is driving me crazy

Hi,
I've spend several hours trying to get a simple java command line call to run using cfexecute with no luck.

I am using windows 2003 with JRun/CF6.1

I have tested the command in dos and it works fine but no matter what I do using cfexecute it simple will not run and will will timeout everytime. The test im doing should only take a few seconds to run so its not an issue with the process taking too long.

<cfexecute
      name="java"
      arguments="-jar c:\regain\crawler\regain.jar -config c:\config\CrawlerConfiguration.xml -logConfig c:\regain\crawler\log4j.properties"
      timeout="300"
      variable="output" />

I've tried putting the arguments in the name attribute as noted by some other bug fixes but it didn't make a difference.

Any advice would be appreciated.
Avatar of AK_00
AK_00

Have you tried calling the command line as the executable?

<cfexecute
   name="C:\WINDOWS\system32\cmd.exe /c"
   arguments="java -jar etcetc"
>
</cfexecute>
ASKER CERTIFIED SOLUTION
Avatar of AK_00
AK_00

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's kinda fruity, but ColdFusion requires the ".exe" on the end of the name attribute:

<cfexecute
     name="java.exe"
     arguments="-jar c:\regain\crawler\regain.jar -config c:\config\CrawlerConfiguration.xml -logConfig c:\regain\crawler\log4j.properties"
     timeout="300"
     variable="output" />