gpt4 book ai didi

Java : switching between dll depends on system architecture (32/64)

转载 作者:行者123 更新时间:2023-11-29 09:46:04 25 4
gpt4 key购买 nike

我有一个 Java 程序使用了一些 dll。由于必须为特定的系统架构(32 位或 64 位)构建这些嵌入式 dll,我想制作一种方法/东西,允许我的程序在 32/64 位版本的 dll 之间切换(或者如果程序运行则禁用库加载在 64 位系统上)

我希望有一个不同于制作两个版本程序的解决方案

提前致谢,达米安

最佳答案

使用系统属性:

if ("x86".equals(System.getProperty("os.arch"))) {
// 32 bit
} else if ("x64".equals(System.getProperty("os.arch"))) {
// 64 bit
}

关于Java : switching between dll depends on system architecture (32/64),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5379589/

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