如何在 intelliJ Idea 中设置 java.library.path

How to set the java.library.path in intelliJ Idea(如何在 intelliJ Idea 中设置 java.library.path)

本文介绍了如何在 intelliJ Idea 中设置 java.library.path的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮我解决这个错误:

Could anyone please help how do I solve this error:

Native code library failed to load.
java.lang.UnsatisfiedLinkError: no ts-jni in java.library.path

我是第一次使用 IDEA IDE,并且一直使用 Resin_4.0.37 作为服务器来测试我的工作.一旦我在调试模式下启动我的 lcoal 服务器,它会停留大约 1-2 分钟,然后突然下降并通过给我上述错误而断开连接.

I am using IDEA IDE as a first time, and have been using Resin_4.0.37 as a server to test my work. As soon as I start my lcoal server in debug mode it stays for approximately 1-2 mins and then suddenly it drops down and get disconnected by giving me the above error.

我已经正确设置了我的 Windows 环境变量;并且还在我的 IDE intelliJ 中执行了以下操作:

I have set my Windows environmental variable correctly; and have also did the following in my IDE intelliJ:

 FILE->Project Structure->set Global Libraries->a. Java path and b. Resin library path.

任何人都可以建议我,我做错了什么以及如何在 intelliJ IDEA 中设置本机库来解决上述错误.

Can any one please suggest me, what am I doing wrong and how do I set native library in intelliJ IDEA to solve the mentioned error.

任何帮助将不胜感激.如果我做错了什么也请纠正我.

Any help would be appreciated. Also do correct me if I am doing something wrong.

谢谢!

推荐答案

如果你从 IntelliJ 运行你的程序,那么你可以在 VM options 中设置 java.library.pathRun/Debug Configurations 对话框中的 code> 输入字段.

If you run your program from IntelliJ then you can set the java.library.path in the VM options input field in the Run/Debug Configurations dialog.

例子:

-Djava.library.path="C:path owhere hejnilibis"

这篇关于如何在 intelliJ Idea 中设置 java.library.path的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何在 intelliJ Idea 中设置 java.library.path

基础教程推荐