gpt4 book ai didi

java - 在我的 jar 中将要访问的 .dll 放在哪里

转载 作者:行者123 更新时间:2023-12-02 06:56:59 25 4
gpt4 key购买 nike

我有一个java应用程序需要加载某个dll。我已将我的 .dll 放入项目中,它从 Eclipse 运行良好,但是当我将项目导出到可运行的 jar 时,我无法运行该 jar,并且有一个异常(exception)不满意链接错误,java.library.path 中没有 dllname我需要 jar 里面有 dll,并且有一个完整的可运行 jar,而不需要对每个客户的构建路径进行任何配置。

最佳答案

Just package it anywhere in the jar. One thing you have to keep in mind though - before you can use the DLLs you need to actually extract these from the JAR and dump these on the hard disk somewhere otherwise you won't be able to load these

How to make a JAR file that includes DLL files?

关于java - 在我的 jar 中将要访问的 .dll 放在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17198862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com