当前位置: 首页>>代码示例>>Java>>正文


Java SystemInfo.is64Bit方法代码示例

本文整理汇总了Java中com.intellij.openapi.util.SystemInfo.is64Bit方法的典型用法代码示例。如果您正苦于以下问题:Java SystemInfo.is64Bit方法的具体用法?Java SystemInfo.is64Bit怎么用?Java SystemInfo.is64Bit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.util.SystemInfo的用法示例。


在下文中一共展示了SystemInfo.is64Bit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doGetSettingsFilePath

import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
@NotNull
private static String doGetSettingsFilePath(boolean customLocation) {
  final String vmOptionsFile = System.getProperty("jb.vmOptionsFile");
  if (!StringUtil.isEmptyOrSpaces(vmOptionsFile)) {
    return vmOptionsFile;
  }

  if (SystemInfo.isMac) {
    if (customLocation) {
      return PathManager.getConfigPath() + "/idea.vmoptions";
    }
    else {
      return PathManager.getBinPath() + "/idea.vmoptions";
    }
  }

  final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase(Locale.US);
  final String platformSuffix = SystemInfo.is64Bit ? "64" : "";
  final String osSuffix = SystemInfo.isWindows ? ".exe" : "";
  return PathManager.getBinPath() + File.separatorChar + productName + platformSuffix + osSuffix + ".vmoptions";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:VMOptions.java

示例2: getUnableToRunMessage

import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
private static Iterable<?> getUnableToRunMessage() {
  boolean isLinux64 = SystemInfo.isLinux && SystemInfo.is64Bit;

  String likelyReason = isLinux64
                        ? "One common reason for this is missing 32 bit compatibility libraries."
                        : "One common reason for this failure is missing required libraries";

  String message = "Unable to run <strong>" + TOOL_NAME + "</strong> SDK tool.";

  List<String> lines = Lists.newArrayList(message, likelyReason, "Please fix the underlying issue and retry.");
  if (isLinux64) {
    String docHyperlink = "<a href=\"" + URL_MISSING_LIBRARIES + "\">" + LINK_MISSING_LIBRARIES + "</a>";
    lines.add(docHyperlink);
  }
  return lines;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:CheckSdkOperation.java

示例3: mapLibraryName

import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
private static String mapLibraryName(String libName) {
  String baseName = libName;
  if (SystemInfo.is64Bit) {
    baseName = baseName.replace("32", "") + "64";
  }
  String fileName = System.mapLibraryName(baseName);
  if (SystemInfo.isMac) {
    fileName = fileName.replace(".jnilib", ".dylib");
  }
  return fileName;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:UrlClassLoader.java

示例4: is64bit

import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public boolean is64bit() {
  return SystemInfo.is64Bit;
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:4,代码来源:SystemBitness.java

示例5: getWindowProperty

import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
@Nullable
private <T> T getWindowProperty(long window, long name, long type, long expectedFormat) throws Exception {
  T property = null;

  long data = unsafe.allocateMemory(64);
  awtLock.invoke(null);
  try {
    unsafe.setMemory(data, 64, (byte)0);

    int result = (Integer)XGetWindowProperty.invoke(
      null, display, window, name, 0l, 65535l, (long)False, type, data, data + 8, data + 16, data + 24, data + 32);
    if (result == 0) {
      int format = unsafe.getInt(data + 8);
      long pointer = SystemInfo.is64Bit ? unsafe.getLong(data + 32) : unsafe.getInt(data + 32);

      if (pointer != None && format == expectedFormat) {
        int length = SystemInfo.is64Bit ? (int)unsafe.getLong(data + 16) : unsafe.getInt(data + 16);
        if (format == FORMAT_BYTE) {
          byte[] bytes = new byte[length];
          for (int i = 0; i < length; i++) bytes[i] = unsafe.getByte(pointer + i);
          property = (T)bytes;
        }
        else if (format == FORMAT_LONG) {
          long[] values = newLongArray(length);
          for (int i = 0; i < length; i++) {
            values[i] = SystemInfo.is64Bit ? unsafe.getLong(pointer + 8 * i) : unsafe.getInt(pointer + 4 * i);
          }
          property = (T)values;
        }
        else if (format != None) {
          LOG.info("unexpected format: " + format);
        }
      }

      if (pointer != None) XFree.invoke(null, pointer);

    }
  }
  finally {
    awtUnlock.invoke(null);
    unsafe.freeMemory(data);
  }

  return property;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:46,代码来源:X11UiUtil.java


注:本文中的com.intellij.openapi.util.SystemInfo.is64Bit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。