简体   繁体   English

错误:执行jar文件时发生了JNI错误

[英]Error: A JNI error has occurred while executing jar file

I'm getting the below exception when i'm trying to run my jar file though powershell using the command java -jar restcall.jar : 当我尝试使用命令java -jar restcall.jar通过powershell运行我的jar文件时,出现以下异常:

Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException 错误:发生了JNI错误,请检查安装,然后重试。线程“主”中的异常java.lang.NoClassDefFoundError:org / apache / http / client / ClientProtocolException

It complies and runs perfectly in eclipse. 它可以在月食中运行并完美运行。 Kindly help. 请帮助。

从Powershell调用Java时,请检查Eclipse环境中定义的类路径,并使用-cp选项对其进行定义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM