Error: java.lang.UnsatisfiedLinkError: no ntvinv in java.library.path
Error Message
When compiling or executing a Java application that uses the ArcObjects Java API, the following error is returned:
java.lang.UnsatisfiedLinkError: no ntvinv in java.library.path
Cause
The PATH variable does not include a directory which contains the native libraries required for ArcObjects Java classes to function.
Solution or Workaround
Add the directory that contains the native libraries needed by ArcObjects Java to the PATH variable.
- On both Windows and Unix platforms, add either of the following directories to the PATH variable:
A. $AGSDESKTOPJAVA\java\jre\bin
B. $AGSDESKTOPJAVA\binNote:
$ARCENGINEHOME may need to be replaced with the location of the ArcGIS SDK installation. - Unix also provides the option of running the ArcEngine helper scripts in $ARCENGINEHOME: init_engine.csh or init_engine.sh.
- See ArcGIS SDK for Java Environment Settings in the Related Information section below for additional information.
On Windows, you must modify your PATH
system variable to include either:
%AGSDESKTOPJAVA%\java\jre\bin
%AGSDESKTOPJAVA%\bin
package com.ys.test; //Example 1: Hello ArcObjects!
import java.io.IOException;
import com.esri.arcgis.system.AoInitialize;
import com.esri.arcgis.system.EngineInitializer;
import com.esri.arcgis.system.esriLicenseProductCode;
import com.esri.arcgis.system.esriLicenseStatus;
import com.esri.arcgis.carto.MapServer;
public class EngineHelloWorld{
public static void main(String[] args){
try{
//Step 1: Initialize the Java Componet Object Model (COM) Interop.
EngineInitializer.initializeEngine(); //Step 2: Initialize an ArcGIS license.
AoInitialize aoInit = new AoInitialize();
initializeArcGISLicenses(aoInit); //Step 3: Invoke ArcObjects.
MapServer mapServer = new MapServer(); String DevKitInstallDir = System.getenv("AGSDESKTOPJAVA"); mapServer.connect(DevKitInstallDir +
"/MapTemplates/Traditional Layouts/World/Europe.mxd"); String name = mapServer.getDefaultMapName(); System.out.println("Hello, ArcObjects!: " + name); //Step 4: Release the license.
aoInit.shutdown();
}
catch (IOException ex){
System.out.println(ex.getMessage());
System.out.println("App failed.");
}
} //End of method main. //License initialization
static void initializeArcGISLicenses(AoInitialize aoInit){
try{
if (aoInit.isProductCodeAvailable
(esriLicenseProductCode.esriLicenseProductCodeEngine) ==
esriLicenseStatus.esriLicenseAvailable){
aoInit.initialize
(esriLicenseProductCode.esriLicenseProductCodeEngine);
}
else if (aoInit.isProductCodeAvailable
(esriLicenseProductCode.esriLicenseProductCodeBasic) ==
esriLicenseStatus.esriLicenseAvailable){
aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeBasic)
;
}
else{
System.err.println(
"Engine Runtime or Desktop Basic license not initialized.");
System.err.println("Exiting application.");
System.exit( - 1);
}
}
catch (Exception e){
e.printStackTrace();
}
} //End of method initializeArcGISLicenses
} //End of class:EngineHelloWorld.
Hello World
http://desktop.arcgis.com/en/arcobjects/latest/java/
http://support.esri.com/technical-article/000007942
http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/JavaArcGISProgramming.htm
Error: java.lang.UnsatisfiedLinkError: no ntvinv in java.library.path的更多相关文章
- ubuntu 12.04 x86_64:java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons
sy@sy-Aspire-:~$ .0_155965261/configuration/.log !SESSION -- ::39.595 ------------------------------ ...
- java.lang.UnsatisfiedLinkError: no XXX in java.library.path
其中涉及的测试源码如下: For those who didn't install Javawith default settings, a systematic way for solving JN ...
- "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no freetype in java.library.path
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no freetype in java ...
- java.lang.NoClassDefFoundError: com.sap.conn.jco.JCo (initialization failure) java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
java.lang.NoClassDefFoundError: com.sap.conn.jco.JCo (initialization failure) at java.lang.J9VMInter ...
- Exception in thread "main" java.lang.UnsatisfiedLinkError: no awt in java.library.path:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no awt in java.library.path: 这是 ...
- 异常:没有找到本地方法库,java.lang.UnsatisfiedLinkError: no trsbean in java.library.path
1.问题描述 迁移环境中遇到这个问题 : Fri Apr 20 15:22:31 CST 2018, Exception:500004___-500004,没有找到本地方法库,java.lang.Un ...
- Exception from System.loadLibrary(smjavaagentapi) java.lang.UnsatisfiedLinkError: no smjavaagentapi in java.library.path
可能原因: 缺少smjavaagentapi.jar文件或者libsjavaagentapi.so缺少相关的依赖包. 解决方法: 1. 检查sso的lib下面是否有smjavaagentapi.jar ...
- jni调用 java.lang.UnsatisfiedLinkError: no segmentor_jni in java.library.path
改过 LD_LIBRARY_PATH 改过 /etc/ld.so.conf 参考这篇文章 http://blog.csdn.net/zjuylok/article/details/4152559 最后 ...
- java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
1.system32添加sapjco3.dll 2.tomcat bin下添加sapjco3.dll 3.项目中添加sapjco3.jar 包
随机推荐
- 1.NopCommerce下载与安装
NoCommerce是基于微软ASP.NET MVC + EntityFramework 技术开发的一套开源电子商城系统,其架构与设计非常精妙被誉为.NET商城的经典之作. 作为一个.NET程序爱好者 ...
- 使用nmon监控服务器性能
1.下载nmon:http://nmon.sourceforge.net/pmwiki.php?n=Site.Download 2.选择适合Linux系统版本的相应nmon版本,Linux查看系统版本 ...
- AOJ 740 求和
链接:http://icpc.ahu.edu.cn/OJ/Problem.aspx?id=740 Description 对于正整数n,k,我们定义这样一个函数f,它满足如下规律f(n,k=1 ...
- UESTC 912 树上的距离 --LCA+RMQ+树状数组
1.易知,树上两点的距离dis[u][v] = D[u]+D[v]-2*D[lca(u,v)] (D为节点到根节点的距离) 2.某条边<u,v>权值一旦改变,将会影响所有以v为根的子树上的 ...
- DoTween(HOTween V2) 教程
DoTween资料 官方网站:http://dotween.demigiant.com/ 下载地址:http://dotween.demigiant.com/download.php 快速开始:htt ...
- UltraISO制作U盘启动盘安装Win7/10系统攻略
UltraISO制作U盘启动盘安装Win7/9/10系统攻略 U盘安装好处就是不用使用笨拙的光盘,光盘还容易出现问题,无法读取的问题.U盘体积小,携带方便,随时都可以制作系统启动盘. U盘建议选择8G ...
- canvas仿屏幕保护运动线条
canvas是H5中及其重要的一个新标签,它得出现不仅让前端做图形图表功能变得异常强大,还用极强的性能丰富前端渲染页面的能力. Life is not a problem to be solved, ...
- 005医疗项目-模块一:用户的查找:1.用户表查询的sql语句
这是医疗项目的第一个模块:做一个用户的查询,可以根据用户的账号,用户的名称,单位的名称,用户的类型去查询.要求效果如下:
- 21SpringMvc_异步发送表单数据到Bean,并响应JSON文本返回(这篇可能是最重要的一篇了)
这篇文章实现三个功能:1.在jsp页面点击一个按钮,然后跳转到Action,在Action中把Emp(int id ,String salary,Data data)这个实体变成JSON格式返回到页面 ...
- Delphi7下SuperObject的JSON使用方法
uses superobject; procedure TForm1.FormCreate(Sender: TObject); var aJson: ISuperObject; aSuperArray ...