You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
问题:在win 64位的操作系统上使用32位的java运行此jar 回编译找不到libwinpthread-1.dll
原因:查看了下源码,主要是在OSDetection 类中的判断系统位数,取的是System.getProperty("sun.arch.data.model").toLowerCase() ,此方法获取到的当前java的位数,由于java安装的是32位的,所以此值为32,而不是系统的位数(64位系统),拷贝了32位的aapt 和系统不匹配导致出现此问题。
修复:目前自己克隆了代码修改判断:
package brut.util;
public class OSDetection {
private static String OS = System.getProperty("os.name").toLowerCase();
private static String Bit = System.getProperty("sun.arch.data.model").toLowerCase();
* 修复64位系统使用32位的jdk获取的 System.getenv("PROCESSOR_ARCHITECTURE")一直是32的问题。
* 以下修复方案在win下测试通过,其他系统待测试
static {
if (System.getenv("PROCESSOR_ARCHITECTURE").toLowerCase().contains("64") || System.getenv("PROCESSOR_ARCHITEW6432").toLowerCase().contains("64")) {
Bit = "64";
} else {
Bit = "32";
public static boolean isWindows() {
return (OS.contains("win"));
public static boolean isMacOSX() {
return (OS.contains("mac"));
public static boolean isUnix() {
return (OS.contains("nix") || OS.contains("nux") || OS.contains("aix") || (OS.contains("sunos")));
public static boolean is64Bit() {
return Bit.equalsIgnoreCase("64");
public static String returnOS() {
return OS;
public static void main(String[] args) {
System.out.println(is64Bit());