com.sun.appserv.server.util.Version.getVersionNumber()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中com.sun.appserv.server.util.Version.getVersionNumber()方法的一些代码示例,展示了Version.getVersionNumber()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getVersionNumber()方法的具体详情如下:
包路径:com.sun.appserv.server.util.Version
类名称:Version
方法名:getVersionNumber

Version.getVersionNumber介绍

[英]Return major_version [. minor_version [. update_version]]
[中]返回主要版本[.次要版本[.更新版本]]

代码示例

代码示例来源:origin: org.glassfish.main.common/common-util

/**
 * Returns version
 */
public static String getVersion() {
  StringBuilder sb = new StringBuilder(getProductName());
  sb.append(" ").append(getVersionPrefix());
  sb.append(" ").append(getVersionNumber());
  sb.append(" ").append(getVersionSuffix());
  return sb.toString();
}

代码示例来源:origin: eclipse-ee4j/glassfish

/**
 * Returns version
 */
public static String getVersion() {
  StringBuilder sb = new StringBuilder(getProductName());
  sb.append(" ").append(getVersionPrefix());
  sb.append(" ").append(getVersionNumber());
  sb.append(" ").append(getVersionSuffix());
  return sb.toString();
}

代码示例来源:origin: org.glassfish.main.core/kernel

@Override
  public void execute(AdminCommandContext context) {
    String vers;
    if (verbose) {
      vers = strings.getLocalString("version.verbose",
        "{0}, JRE version {1}",
        Version.getFullVersion(), System.getProperty("java.version"));
    } else {
      vers = strings.getLocalString("version",
        "{0}", Version.getFullVersion());
    }
    ActionReport report = context.getActionReport();
    Properties ep = new Properties();
    ep.setProperty("version", Version.getVersion());
    ep.setProperty("full-version", Version.getFullVersion());
    ep.setProperty("version-number", Version.getVersionNumber());     
    report.setExtraProperties(ep);
    report.setActionExitCode(ExitCode.SUCCESS);
    report.setMessage(vers);
  }
}

相关文章