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. [转].NET下读取PDF文本

    本文转自:http://blog.csdn.net/wangqiuyun/article/details/8548779 在.NET下读取PDF文本用到的类库主要有两个:PDFBox和iTextSha ...

  2. 《TCP/IP详解 卷一》读书笔记-----TCP persist &Keeplive timer

    1.persist timer:当接收方建议的窗口大小为0时,发送方就会停止发送,直到接收方有缓存空间时再用一个窗口值非零的ACK提示发送方可以继续发送.但是这个称为window update的ACK ...

  3. codeforces 712A A. Memory and Crow(水题)

    题目链接: A. Memory and Crow time limit per test 2 seconds memory limit per test 256 megabytes input sta ...

  4. bitbucket和Mercurial安装和相关

    应为工作需要,需要使用bitbucket和Mercurial进行软件开发管理.下面简单介绍以下这些东西和他的安装. bitbucket是一个类似github的软件开发管理工具,和github不同,bi ...

  5. UESTC 1237 质因子分解

    水题一枚.. #include<iostream> #include<cstdio> #include<cstring> #include<cmath> ...

  6. 来说说SpringMVC + JSONP的跨域请求

    先来说说场景,JSON,这货大家应该都懂,不懂的请自动面壁思过,那么什么是JSONP,不是JSON放了个P就叫JSONP,而是JSON with Padding,在进行跨域请求的时候需要的数据,什么是 ...

  7. FreeMarker 一二事 - 静态模板结合spring展示

    freemarker可以脱离web使用 前一篇文章使用了普通的方法 这回说说结合spring pom额外引入这个jar包 <dependency> <groupId>org.s ...

  8. linux上的常见命令掌握

    http://coolshell.cn/articles/8883.html 这篇文章来源于Quroa的一个问答<What are some time-saving tips that ever ...

  9. Windows server 2008系统基本优化

    前几天用上了Windows server 2008刚开始还真不习惯,毕竟是做服务器用的系统和娱乐操作系统有很大区别.先总结几点,以后慢慢更新 安装Win2008驱动: 大部分支持vista系统的驱动都 ...

  10. (已解决) 未能加载文件或程序集“Newtonsoft.Json, Version=4.0.0.0, Culture=neutral,

    在项目web.config里面添加: <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4F ...