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 包
随机推荐
- 图的遍历之深度优先搜索(DFS)
深度优先搜索(depth-first search)是对先序遍历(preorder traversal)的推广.”深度优先搜索“,顾名思义就是尽可能深的搜索一个图.想象你是身处一个迷宫的入口,迷宫中的 ...
- 【转】dsadd user批量创建AD用户命令详解
常见的批量创建用户的方法有四种: 一. 帐户模板的方式 二. CSVDE和LDIFDE 三. 脚本的方式 四. DSADD 但是很少有详细的资料使用DSADD的方式来批量创建帐户,那么我就把我近期使用 ...
- HDU 4419 Colourful Rectangle --离散化+线段树扫描线
题意: 有三种颜色的矩形n个,不同颜色的矩形重叠会生成不同的颜色,总共有R,G,B,RG,RB,GB,RGB 7种颜色,问7种颜色每种颜色的面积. 解法: 很容易想到线段树扫描线求矩形面积并,但是如何 ...
- HDU 1850 Being a Good Boy in Spring Festival
此题先考虑第一种,5 7 9的情况,先手如果想赢,则必定要把异或值变为0,因为随便取,所以此处的异或指的是对堆中的石子数进行异或,而非异或其SG函数. 首先7^9=14,因为要异或为0,则5要变成14 ...
- Java虚拟机详解02----JVM内存结构
主要内容如下: JVM启动流程 JVM基本结构 内存模型 编译和解释运行的概念 一.JVM启动流程: JVM启动时,是由java命令/javaw命令来启动的. 二.JVM基本结构: JVM基本结构图: ...
- View (一)LayoutInflater()方法详解
相信接 触Android久一点的朋友对于LayoutInflater一定不会陌生,都会知道它主要是用于加载布局的.而刚接触Android的朋友可能对 LayoutInflater不怎么熟悉,因为加载布 ...
- javascript中的array对象属性及方法
Array 对象 Array 对象用于在单个的变量中存储多个值. 创建 Array 对象的语法: new Array(); new Array(size); new Array(element0, e ...
- [转]iOS 应用内付费(IAP)开发步骤
FROM : http://blog.csdn.net/xiaoxiangzhu660810/article/details/17434907 参考文章链接: (1)http://mobile.51c ...
- MySQL数据备份小结
一 MySQL备份恢复总结: 1,备份所有库 2,分库备份 3,备份某库中的某表 4,备份某库中的多个表 5,分表备份 6,只备份表结构 7,只备份数据 二 MySQL备份恢复参数总结: -A 备份所 ...
- PHP基础20:创建文件
<?php /* 1.PHP 创建文件 - fopen() fopen() 函数也用于创建文件.也许有点混乱,但是在 PHP 中,创建文件所用的函数与打开文件的相同 如果您用 fopen() 打 ...