大家好,我正在与arcgis sdk for java的一个问题作斗争。我按照文档https://developers.arcgis.com/java/latest/guide/get-the-sdk.htm中提到的maven指南获得了sdk和jars,然后我运行了依赖项:unpack目标,我可以在homedirectory/.arcgis
目录中看到运行时文件,当我从eclipse ide运行项目时,它工作得很好,但是一旦我将jar转换成可执行的jar并尝试运行它,它就会给我错误。
Caused by: java.lang.RuntimeException: Could not find runtime in any of:
- A directory specified by calling ArcGISRuntimeEnvironment.setInstallDirectory()
- The current directory E:\eclipseprojects\gisdemo
- A location specified by the environment variable ARCGISRUNTIMESDKJAVA_100_7_0
- Within the ".arcgis" directory in the user's home path C:\Users\wickwayne\.arcgis
一旦我将jnilib和来自.arcgis\100.7.0目录的资源放在jar的项目文件旁边,可执行的jar就开始工作了,但是为什么会这样,为什么arcgis运行时没有从用户的主目录中获取,而它已经在用户主目录中了?需要帮助
发布于 2020-03-09 16:44:49
也许可以试着在代码的开头添加:
ArcGISRuntimeEnvironment.setInstallDirectory("path\\arcgis-runtime-sdk-java-100.7.0");
https://stackoverflow.com/questions/60001669
复制