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


Java Platform类代码示例

本文整理汇总了Java中org.netbeans.installer.utils.helper.Platform的典型用法代码示例。如果您正苦于以下问题:Java Platform类的具体用法?Java Platform怎么用?Java Platform使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Platform类属于org.netbeans.installer.utils.helper包,在下文中一共展示了Platform类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPlatform

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
@Override
protected Platform getPlatform() {
    final String osName = System.getProperty("os.name");

    if (osName.equals("FreeBSD")) {
        return getPlatformFreeBSD();
    } else if (osName.equals("OpenBSD")) {
        return getPlatformOpenBSD();
    } else if (osName.endsWith("BSD")) {
        return getPlatformBSD();
    } else if (osName.equals("AIX")) {
        return getPlatformAIX();
    } else if (osName.toLowerCase(Locale.ENGLISH).startsWith("hp-ux")) {
        return getPlatformHPUX();
    } else {
        return Platform.UNIX;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:UnixNativeUtils.java

示例2: getPlatform

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
@Override
protected Platform getPlatform() {        
    final String osArch = System.getProperty("os.arch");
    if (osArch.contains("ppc")) {
        return SystemUtils.isCurrentJava64Bit() ? 
            Platform.LINUX_PPC64 : 
            Platform.LINUX_PPC;
    } else if (osArch.contains("sparc")) {
        return  Platform.LINUX_SPARC;
    } else if(osArch.equals("ia64")) {
        return Platform.LINUX_IA64;
    } else {
        return SystemUtils.isCurrentJava64Bit() ? 
            Platform.LINUX_X64 : 
            Platform.LINUX_X86;
    }        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:LinuxNativeUtils.java

示例3: newLauncher

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
public static Launcher newLauncher(
        final LauncherProperties properties, 
        final Platform platform) {
    if (platform.isCompatibleWith(Platform.WINDOWS)) {
        return new ExeLauncher(properties);
    }

    if (platform.isCompatibleWith(Platform.MACOSX)) {
        return new CommandLauncher(properties);
    }
    
    if (platform.isCompatibleWith(Platform.UNIX)) {
        return new ShLauncher(properties);
    }
    
    
    return new JarLauncher(properties);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:LauncherFactory.java

示例4: executeForward

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
@Override
public void executeForward() {
    final Registry registry = Registry.getInstance();

    // remove all current children (if there are any), as the components
    // selection has probably changed and we need to rebuild from scratch
    getChildren().clear();

    // we're creating a bundle - we only need to download and package things
    addChild(preCreateBundleSummaryPanel);
    addChild(downloadConfigurationLogicAction);
    addChild(downloadInstallationDataAction);
    addChild(createBundleAction);

    if (registry.getTargetPlatform().isCompatibleWith(Platform.MACOSX)) {
        addChild(createAppLauncherAction);
    } else {
        addChild(createNativeLauncherAction);
    }
    addChild(postCreateBundleSummaryPanel);

    super.executeForward();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:CreateBundleSequence.java

示例5: createBundle

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
public File createBundle(
        final File root,
        final Platform platform,
        final String[] components,
        Properties props,
        Properties bundleProps) throws ManagerException {
    final ReentrantLock lock = getLock(root);
    
    try {
        lock.lock();
        
        initializeRegistryNoLock(root);
        
        return createBundleNoLock(root, platform, components,props,bundleProps);
    } finally {
        lock.unlock();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:RegistriesManagerImpl.java

示例6: loadRegistry

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
private Registry loadRegistry(
        final File root,
        final File tempUserDir,
        final Platform platform) throws ManagerException {
    try {
        final File registryXml =
                new File(root, REGISTRY_XML);
        
        final Registry registry = new Registry();
        registry.setLocalDirectory(tempUserDir);
        registry.setFinishHandler(DummyFinishHandler.INSTANCE);
        registry.setTargetPlatform(platform);
        registry.loadProductRegistry(registryXml);
        
        return registry;
    } catch (InitializationException e) {
        throw new ManagerException(e);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:RegistriesManagerImpl.java

示例7: ProductFilter

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
public ProductFilter(final String uid, final Version version, final Platform platform) {
    this();
    
    this.uid = uid;
    this.versionLower = version;
    this.versionUpper = version;
    this.platforms.add(platform);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:ProductFilter.java

示例8: isCompatibleWith

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
public boolean isCompatibleWith(final Platform platform) {
    for (Platform compatiblePlatform: supportedPlatforms) {
        if (compatiblePlatform.isCompatibleWith(platform)) {
            return true;
        }
    }
    
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:Product.java

示例9: parsePlatform

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
public static Platform parsePlatform(
        final String string) throws ParseException {
    for (Platform platform: Platform.values()) {
        if (platform.getCodeName().equals(string)) {
            return platform;
        }
    }
    
    throw new ParseException(ResourceUtils.getString(StringUtils.class,
            StringUtils.ERROR_UNKNOWN_PLATFORM, string));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:StringUtils.java

示例10: parsePlatforms

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
public static List<Platform> parsePlatforms(
        final String string) throws ParseException {
    final List<Platform> platforms = new ArrayList<Platform>();
    
    for (String name: asList(string, " ")) {
        final Platform platform = parsePlatform(name);
        
        if (!platforms.contains(platform)) {
            platforms.add(platform);
        }
    }
    
    return platforms;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:StringUtils.java

示例11: getPlatform

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
@Override
protected Platform getPlatform() {
    return SystemUtils.isCurrentJava64Bit() ? 
                        (System.getProperty("os.arch").equals("ia64") ? 
                           Platform.WINDOWS_IA64 : 
                           Platform.WINDOWS_X64) : 
                        Platform.WINDOWS_X86;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:WindowsNativeUtils.java

示例12: getPlatformOpenBSD

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
private Platform getPlatformOpenBSD() {
    final String osArch = System.getProperty("os.arch");
    if (osArch.contains("ppc") || osArch.contains("PowerPC")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.OPENBSD_PPC64 : Platform.OPENBSD_PPC;
    } else if (osArch.contains("sparc")) {
        return Platform.OPENBSD_SPARC;
    } else if (osArch.matches("i[3-6]86|x86|amd64|x86_64")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.OPENBSD_X64 : Platform.OPENBSD_X86;
    } else {
        return Platform.OPENBSD;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:UnixNativeUtils.java

示例13: getPlatformFreeBSD

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
private Platform getPlatformFreeBSD() {
    final String osArch = System.getProperty("os.arch");
    if (osArch.contains("ppc") || osArch.contains("PowerPC")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.FREEBSD_PPC64 : Platform.FREEBSD_PPC;
    } else if (osArch.contains("sparc")) {
        return Platform.FREEBSD_SPARC;
    } else if (osArch.matches("i[3-6]86|x86|amd64|x86_64")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.FREEBSD_X64 : Platform.FREEBSD_X86;
    } else {
        return Platform.FREEBSD;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:UnixNativeUtils.java

示例14: getPlatformBSD

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
private Platform getPlatformBSD() {
    final String osArch = System.getProperty("os.arch");
    if (osArch.contains("ppc") || osArch.contains("PowerPC")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.BSD_PPC64 : Platform.BSD_PPC;
    } else if (osArch.contains("sparc")) {
        return Platform.BSD_SPARC;
    } else if (osArch.matches("i[3-6]86|x86|amd64|x86_64")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.BSD_X64 : Platform.BSD_X86;
    } else {
        return Platform.BSD;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:UnixNativeUtils.java

示例15: getPlatformAIX

import org.netbeans.installer.utils.helper.Platform; //导入依赖的package包/类
private Platform getPlatformAIX() {
    final String osArch = System.getProperty("os.arch");
    if (osArch.contains("ppc") || osArch.contains("PowerPC")) {
        return SystemUtils.isCurrentJava64Bit() ? Platform.AIX_PPC64 : Platform.AIX_PPC;
    } else {
        return Platform.AIX;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:UnixNativeUtils.java


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