gpt4 book ai didi

java - 为什么 Java 应用程序不能从自己的 .jar 加载库二进制文件?

转载 作者:行者123 更新时间:2023-11-30 06:06:15 26 4
gpt4 key购买 nike

在寻找一种方法让我的 Java 项目加载项目中包含的库二进制文件时,我看到几个人这样说:

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

这个说法属实吗?为什么?

最佳答案

动态链接库 (DLL) 是特定于系统的,加载它们会调用 JVM 及其类加载器范围之外的某些操作系统操作。

因此您无法轻松地从 jar 文件中加载它们。

关于java - 为什么 Java 应用程序不能从自己的 .jar 加载库二进制文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44654443/

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