gpt4 book ai didi

java - 在 Mac OS X 上运行 Ant build 时出现 "Permission denied"错误

转载 作者:行者123 更新时间:2023-11-30 07:17:42 25 4
gpt4 key购买 nike

我正在尝试从 Ant 运行 FlexUnit 测试。在 Windows 上一切正常,但在 Mac OS X 上,我收到此错误:

BUILD FAILED
/Users/ohassan/Projects/mongo/build.xml:347: java.io.IOException: Cannot run program "/Applications/Adobe Flash Builder 4.5/player/mac/11.5/Flash Player Debugger.app" (in directory "/Users/ohassan/Projects/x"): error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at org.flexunit.ant.launcher.commands.player.CustomPlayerCommand.launch(Unknown Source)
at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
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:809)
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: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 20 more

这是 Ant 任务:

<flexunit swf="${APP_BIN_DIR}/UnitTestingApp.swf" timeout="5000" toDir="${APP_REPORTS_DIR}" haltonfailure="false" verbose="true" localTrusted="false" command="${FLASH_PLAYER}" />

我为 ${APP_BIN_DIR}${APP_REPORTS_DIR}Flash Player Debugger.app 授予了 777 权限,但这并没有改变任何事物。我还尝试运行命令 sudo ant 但这对错误也没有影响。

最佳答案

您似乎正在运行名为 .../Flash Player Debugger.app 的文件夹。您要做的是在该文件夹中运行二进制文件。我最好的猜测是它被命名为 .../Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger

使用 Finder 或其他文件浏览器实用程序显示文件夹 /Applications/Adobe Flash Builder 4.5/player/mac/11.5/Flash Player Debugger.app/Contents/MacOS 的内容out 可执行文件的名称。

关于java - 在 Mac OS X 上运行 Ant build 时出现 "Permission denied"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15882012/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com