studio
2024.10
true
UiPath logo, featuring letters U and I in white
Studio 用户指南
Last updated 2024年11月18日

在 macOS 上安装扩展程序

在自定义文件夹中安装扩展程序

有多种方法可以从 macOS 上的自定义目录加载 Java 扩展程序,与 Windows 环境中的过程类似。

虽然这些示例基于从 .jar 文件启动的 JavaDisabledElements Java 应用程序,但它们也适用于其他应用程序。

使用命令行参数

此方法适用于所有 Java 版本,包括 Java 9 或更高版本:

/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home/bin/java -cp /Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport/UiPathBridge.jar:/Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport/UiPathV8.jar:/Users/example/Documents/UiPath/Driver/Qa/UiPath.Driver.Tests/open/TestApps/JavaDisabledElementsApp/JavaDisabledElements.jar -Djavax.accessibility.assistive_technologies=UiPath.UiPathBridge JavaDisabledElements/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home/bin/java -cp /Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport/UiPathBridge.jar:/Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport/UiPathV8.jar:/Users/example/Documents/UiPath/Driver/Qa/UiPath.Driver.Tests/open/TestApps/JavaDisabledElementsApp/JavaDisabledElements.jar -Djavax.accessibility.assistive_technologies=UiPath.UiPathBridge JavaDisabledElements

预期输出:

Loading UiPathBridgeInterface Dll
Java resources directory: /Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport
tryLoadFromPredefinedPaths
UiPathJavaBridge Interface DLL loaded from: /Users/example/Documents/UiPath/Driver/MacOS/Output/UiPathJavaBridgeV8.dylib
Java Version: 1.8.0_401
UiPath Access Bridge startedLoading UiPathBridgeInterface Dll
Java resources directory: /Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport
tryLoadFromPredefinedPaths
UiPathJavaBridge Interface DLL loaded from: /Users/example/Documents/UiPath/Driver/MacOS/Output/UiPathJavaBridgeV8.dylib
Java Version: 1.8.0_401
UiPath Access Bridge started

使用环境变量

如果 Java Runtime 支持扩展程序加载机制,则您可以使用环境变量。以下是一个示例:

export JAVA_TOOL_OPTIONS=-Djava.ext.dirs=/Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport -Djavax.accessibility.assistive_technologies=UiPath.UiPathBridge

/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java -jar /Users/example/Documents/UiPath/Driver/Qa/UiPath.Driver.Tests/open/TestApps/JavaDisabledElementsApp/JavaDisabledElements.jarexport JAVA_TOOL_OPTIONS=-Djava.ext.dirs=/Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport -Djavax.accessibility.assistive_technologies=UiPath.UiPathBridge

/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java -jar /Users/example/Documents/UiPath/Driver/Qa/UiPath.Driver.Tests/open/TestApps/JavaDisabledElementsApp/JavaDisabledElements.jar

预期输出:

Loading UiPathBridgeInterface Dll
Java resources directory: /Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport
tryLoadFromPredefinedPaths
UiPathJavaBridge Interface DLL loaded from: /Users/example/Documents/UiPath/Driver/MacOS/Output/UiPathJavaBridgeV8.dylib
Java Version: 1.8.0_401
UiPath Access Bridge startedLoading UiPathBridgeInterface Dll
Java resources directory: /Users/example/Documents/UiPath/Driver/MacOS/Output/JavaSupport
tryLoadFromPredefinedPaths
UiPathJavaBridge Interface DLL loaded from: /Users/example/Documents/UiPath/Driver/MacOS/Output/UiPathJavaBridgeV8.dylib
Java Version: 1.8.0_401
UiPath Access Bridge started

对于原生 macOS 应用程序

对于原生 macOS 应用程序,可以通过编辑 Info.plist 文件来添加参数。只有在适用的情况下,您才能执行此操作。

以下是一个示例,我们在其中使用了名为 SAPGUI for Java 的应用程序和来自 macOS Driver Portable 内部版本的扩展程序文件:



预期输出:

2024-09-11 11:20:34.924 SAPGUI[31468:4852735] Task succeeded.
Loading UiPathBridgeInterface Dll
Java resources directory: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev/tools/JavaSupport
tryLoadFromPredefinedPaths
Tools path is: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev/tools
Package path is: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev
UiPathJavaBridge Interface DLL loaded from: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev/native/osx-arm64/UiPathJavaBridgeV8.dylib
Java Version: 17.0.11
UiPath Access Bridge started2024-09-11 11:20:34.924 SAPGUI[31468:4852735] Task succeeded.
Loading UiPathBridgeInterface Dll
Java resources directory: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev/tools/JavaSupport
tryLoadFromPredefinedPaths
Tools path is: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev/tools
Package path is: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev
UiPathJavaBridge Interface DLL loaded from: /Users/example/.nuget/packages/uipath.driver.portable/24.11.9014.23827-dev/native/osx-arm64/UiPathJavaBridgeV8.dylib
Java Version: 17.0.11
UiPath Access Bridge started
  • 在自定义文件夹中安装扩展程序
  • 使用命令行参数
  • 使用环境变量
  • 对于原生 macOS 应用程序

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。