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\bin

    Note:
    $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的更多相关文章

  1. ubuntu 12.04 x86_64:java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons

    sy@sy-Aspire-:~$ .0_155965261/configuration/.log !SESSION -- ::39.595 ------------------------------ ...

  2. java.lang.UnsatisfiedLinkError: no XXX in java.library.path

    其中涉及的测试源码如下: For those who didn't install Javawith default settings, a systematic way for solving JN ...

  3. "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 ...

  4. 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 ...

  5. 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: 这是 ...

  6. 异常:没有找到本地方法库,java.lang.UnsatisfiedLinkError: no trsbean in java.library.path

    1.问题描述 迁移环境中遇到这个问题 : Fri Apr 20 15:22:31 CST 2018, Exception:500004___-500004,没有找到本地方法库,java.lang.Un ...

  7. Exception from System.loadLibrary(smjavaagentapi) java.lang.UnsatisfiedLinkError: no smjavaagentapi in java.library.path

    可能原因: 缺少smjavaagentapi.jar文件或者libsjavaagentapi.so缺少相关的依赖包. 解决方法: 1. 检查sso的lib下面是否有smjavaagentapi.jar ...

  8. 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 最后 ...

  9. java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

    1.system32添加sapjco3.dll 2.tomcat bin下添加sapjco3.dll 3.项目中添加sapjco3.jar 包

随机推荐

  1. WEB安全--CSRF剖析

    CSRF攻击:攻击者构造合法的HTTP请求,随后利用用户的身份操作用户帐户的一种攻击方式. 一.CSRF攻击原理CSRF的攻击建立在浏览器与Web服务器的会话中:欺骗用户访问URL.二.CSRF攻击场 ...

  2. NOIP2007 T1奖学金 解题报告-S.B.S.

    洛谷P1093 题目描述 某小学最近得到了一笔赞助,打算拿出其中一部分为学习成绩优秀的前5名学生发奖学金.期末,每个学生都有3门课的成绩:语文.数学.英语.先按总分从高到低排序,如果两个同学总分相同, ...

  3. 【问题&解决】解决 Android SDK下载和更新失败“Connection to https://dl-ssl.google.com refused”的问题

    缘由: 更新sdk,遇到了更新下载失败问题: Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xmlFetche ...

  4. hdu-5904 LCIS(水题)

    题目链接: LCIS Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  5. Android代码优化----Application节点的模板写法及UI工具类

    一. MyApplication类的编写: 新建一个类MyApplication,继承自Application.代码如下: MyApplication.java: package com.smyhva ...

  6. DataGridView 行、列的隐藏和删除

    ) 行.列的隐藏 [VB.NET] ' DataGridView1的第一列隐藏 DataGridView1.Columns(0).Visible = False ' DataGridView1的第一行 ...

  7. java 13-6 Char的包装类Character

    1.Character 类在对象中包装一个基本类型 char 的值 此外,该类提供了几种方法,以确定字符的类别(小写字母,数字,等等),并将字符从大写转换成小写,反之亦然 构造方法: Characte ...

  8. android stuio eclipse映射下的快捷键

    转:关于 android stuio eclipse映射下的快捷键 http://www.cnblogs.com/0616--ataozhijia/p/3870064.html 会持续更新)这边讲的常 ...

  9. Volley(六 )—— 从源码带看Volley的缓存机制

    磁盘缓存DiskBasedCache 如果你还不知道volley有磁盘缓存的话,请看一下我的另一篇博客请注意,Volley已默认使用磁盘缓存 DiskBasedCache内部结构 它由两部分组成,一部 ...

  10. f2fs解析(七)node管理器中的 free_nid 结构体

    除了node_info之外, node管理器中还有还有个重要的数据结构: struct free_nid { struct list_head list; /* for free node id li ...