java - 如何将 java rxtx 库包含到我的 Minecraft mod 中?

标签 java eclipse dll rxtx minecraft-forge

你如何将rxtx dll包含在minecraft forge mod中我对rxtxcomm.jar文件没有任何问题,但我无法将根文件夹包含在类路径中(像平常一样),因为这样游戏就不会因为重复而启动mod(我目前正在使用 eclipse)

最佳答案

在你的 build.gradle 中:

dependencies {
    // create a directory called libs in the directory where the build.gradle is
    compile fileTree(dir: 'libs', include: '*.jar')
}
jar {
    // make in the directory where the build.gradle is a native folder
    // and put your dll's there.
    from('native') {
        into('org/sqlite/native')
        }
    }
 processResources
    {
    //... add this below what's already there under process resources.
    copy {
            from('/native')
            into('/org/sqlite/native')
        }
}

这种东西的组合可以让我将 sqlite jar 和 dll 添加到我的 cookies jar 中。

关于java - 如何将 java rxtx 库包含到我的 Minecraft mod 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38547195/

相关文章:

java - 在 Java 中查找笛卡尔积

java - 使用 Quartz 运行 Spring Boot 应用

java - Eclipse 中的 Ant 构建失败 : Unable to understand the error from console

java - 如何在没有 SVN 元数据的情况下在 Eclipse 中克隆 SVN 管理的项目?

c++ - 使用 std::atomic<int> 安全地连接到程序结构以进行线程访问?

java - 配置 ReSTLet 以在 Google App Engine 上返回 JSP?

java - 将 AWS 签名 header 添加到所有放心请求中

eclipse - m2e 阴影 eclipse "project main artifact does not exist"

c# 使用不在表单中的代码来减少重复代码?

python - 静态链接 Python,但仍支持外部 .pyd 模块