本文整理了Java中com.sun.appserv.server.util.Version.getVersionNumber()
方法的一些代码示例,展示了Version.getVersionNumber()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getVersionNumber()
方法的具体详情如下:
包路径:com.sun.appserv.server.util.Version
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!