Java 我正在运行什么版本的 JBoss?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2335275/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 06:17:11  来源:igfitidea点击:

What version of JBoss I am running?

javatomcatjboss

提问by sixtyfootersdude

(As asked in title:) How do I tell what version of JBoss I am running?

(如标题中所问:)我如何知道我运行的是哪个版本的 JBoss?

I am also curious what version of tomcat I am running. Does a specific version of JBoss correspond to a certain version of tomcat?

我也很好奇我正在运行什么版本的 tomcat。特定版本的 JBoss 是否对应特定版本的 tomcat?

采纳答案by Yishai

JBoss has an MBean called Server. That reports the build and version of JBoss itself. Once you know the version, you can see what components are involved. It is not that well cataloged, but you can see it in the release notes.

JBoss 有一个名为 Server 的 MBean。这会报告 JBoss 本身的构建和版本。一旦知道版本,就可以看到涉及哪些组件。它没有很好地编目,但您可以在发行说明中看到它。

回答by stacker

This URL (JMX-Console) should provide you the informations

此 URL (JMX-Console) 应为您提供信息

http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServer

http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServer

The tomcat version is implied by the jboss server version.

jboss 服务器版本隐含了 tomcat 版本。

EDIT:

编辑:

A complete list of versions you find here VersionOfTomcatInJBossAS

您在此处找到的完整版本列表VersionOfTomcatInJBossAS

Where you reach your JBoss depends on the interface it is bound, using -b hostnameIf you start using JBoss with -b 0.0.0.0 option. That way, you can access the system using localhost, machineName and even the IP address. By default it's localhost, if you use th -b option you need to replace localhostby yourhostname.

您到达 JBoss 的位置取决于它绑定的接口,使用 -b主机名如果您开始使用带有 -b 0.0.0.0 选项的 JBoss。这样,您就可以使用 localhost、machineName 甚至 IP 地址访问系统。默认情况下它是 localhost,如果您使用 th -b 选项,则需要将localhost替换为yourhostname

回答by Fred

In your JBoss lib Directory:

在您的 JBoss 库目录中:

  • Open the file jboss-system.jarby example
  • Extract the file MANIFEST.MF from the META-INFdirectory
  • Open MANIFEST.MFwith a text editor and then look at the property Specification-Versionand Implementation-Version
  • 通过示例打开文件jboss-system.jar
  • META-INF目录中提取文件 MANIFEST.MF
  • 用文本编辑器打开MANIFEST.MF,然后查看属性Specification-VersionImplementation-Version

回答by Kashyap

If it helps there is also a jar-versions.xmlin my JBoss installation in JBoss root folder. This doesn't require you to wgetor jar xvf.

如果有帮助,jar-versions.xml在我的 JBoss 安装中的 JBoss 根文件夹中也有一个。这不需要您wgetjar xvf.

E.g.

例如

$  grep jboss-system.jar /opt/jboss-5.1.0.GA/jar-versions.xml | fold
  <jar name="jboss-system.jar" specVersion="5.1.0.GA" specVendor="JBoss (http://
www.jboss.org/)" specTitle="JBoss" implVersion="5.1.0.GA (build: SVNTag=JBoss_5_
1_0_GA date=200905221634)" implVendor="JBoss Inc." implTitle="JBoss [The Oracle]
" implVendorID="http://www.jboss.org/" implURL="http://www.jboss.org/" sealed="f
alse" md5Digest="c97e8a3dde7433b6c26d723413e17dbc"/>
$

回答by Aaj Kaal

/apps/jboss-eap-6.2/bin/standalone.sh -version

Sample output:

示例输出:

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /apps/jboss-eap-6.2

  JAVA: /apps/jdks/jdk_1.7/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

21:07:20,380 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final-redhat-1
21:07:22,206 INFO  [stdout] (main) JBoss EAP 6.2.2.GA (AS 7.3.2.Final-redhat-2)

回答by Guest

You can retrieve information about the version of your JBoss EAP installation by running the same script used to start the server with the -V switch. For Linux and Unix installations this script is run.sh and on Microsoft Windows installations it is run.bat. Regardless of platform the script is located in $JBOSS_HOME/bin. Using these scripts to actually start your server is dealt with in Chapter 4, Launching the JBoss EAP Server.

您可以通过使用 -V 开关运行用于启动服务器的相同脚本来检索有关 JBoss EAP 安装版本的信息。对于 Linux 和 Unix 安装,此脚本为 run.sh,在 Microsoft Windows 安装中为 run.bat。无论平台如何,脚本都位于 $JBOSS_HOME/bin 中。使用这些脚本来实际启动您的服务器在第 4 章,启动 JBoss EAP 服务器中讨论。

回答by RahulArackal

Just found another way to know the jboss version, so pointing out here:

刚刚找到了另一种了解jboss 版本的方法,所以在这里指出:

In Linux/Windowsuse --versionparameter along with Jboss executableto know the Jboss Version

Linux/Windows使用--version参数和Jboss 可执行文件来了解 Jboss 版本

eg:

例如:

[immo@g012 bin]$  ./run.sh --version
========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /programs/jboss4.2-AES2.3Cert

  JAVA: /programs/java/jdk1.7.0_09/bin/java

  JAVA_OPTS: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 

  CLASSPATH: /programs/jboss4.2-AES2.3Cert/bin/run.jar:/programs/java/jdk1.7.0_09/lib/tools.jar

=========================================================================

Listening for transport dt_socket at address: 8787
JBoss 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)

Here JBoss 4.0.4.GAis the Jboss version

JBoss 4.0.4.GA是Jboss版本

in windows this could be

在 Windows 中,这可能是

run.bat --version

Also, in new versions of jboss the executable is standalone.sh/ standalone.bat

此外,在新版本的 jboss 中,可执行文件是standalone.sh/standalone.bat

回答by ahndi

The version of JBoss should also be visible in the boot log file. Standard install would have that (for linux) in

JBoss 的版本也应该在引导日志文件中可见。标准安装将具有(对于 linux)

/var/log/jboss/boot.log

/var/log/jboss/boot.log

$ head boot.log

$ head boot.log

08:30:07,477 INFO  [Server] Starting JBoss (MX MicroKernel)...
08:30:07,478 INFO  [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
08:30:07,478 DEBUG [Server] Using config: org.jboss.system.server.ServerConfigImpl@4277158a
08:30:07,478 DEBUG [Server] Server type: class org.jboss.system.server.ServerImpl
08:30:07,478 DEBUG [Server] Server loaded through: org.jboss.system.server.NoAnnotationURLClassLoader
08:30:07,478 DEBUG [Server] Boot URLs:

so required info int the above case is

所以上述情况所需的信息是

Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)

版本 ID:JBoss [Trinity] 4.2.2.GA(版本:SVNTag=JBoss_4_2_2_GA 日期=200710221139)

回答by stackbacker

Realize this is an old thread but here are a couple other ways (works with EAP 6.4):

意识到这是一个旧线程,但这里有一些其他方法(适用于 EAP 6.4):

  1. Use JBoss CLI (/opt/jboss/bin)
  1. 使用 JBoss CLI (/opt/jboss/bin)

# jboss-cli.sh -c --controller=127.0.0.1:9999 'version' JBoss Admin Command-line Interface JBOSS_HOME: /opt/AAS/latest/jboss JBoss AS release: 7.5.14.Final-redhat-2 "Janus" JBoss AS product: EAP 6.4.14.GA

# jboss-cli.sh -c --controller=127.0.0.1:9999 'version' JBoss Admin Command-line Interface JBOSS_HOME: /opt/AAS/latest/jboss JBoss AS release: 7.5.14.Final-redhat-2 "Janus" JBoss AS product: EAP 6.4.14.GA

  1. Inspect the identity.conf file
  1. 检查 identity.conf 文件

# more /opt/jboss/.installation/identity.conf patches= cumulative-patch-id=jboss-eap-6.4.14.CPinstalled-patches=jboss-eap-6.4.1.CP,jboss-eap-6.4.2.CP,jboss-eap-6.4.3.CP,jboss-eap-6.4.4.CP,jboss-eap-6.4.5.CP,jboss-eap-6.4.6.CP,jboss-eap-6.4.7.CP,jboss-eap-6.4.8.CP,jboss-eap-6.4.9.CP, jboss-eap-6.4.10.CP,jboss-eap-6.4.11.CP,jboss-eap-6.4.12.CP,jboss-eap-6.4.13.CP,jboss-eap-6.4.14.CP

# more /opt/jboss/.installation/identity.conf patches= cumulative-patch-id=jboss-eap-6.4.14.CPinstalled-patches=jboss-eap-6.4.1.CP,jboss-eap-6.4.2.CP,jboss-eap-6.4.3.CP,jboss-eap-6.4.4.CP,jboss-eap-6.4.5.CP,jboss-eap-6.4.6.CP,jboss-eap-6.4.7.CP,jboss-eap-6.4.8.CP,jboss-eap-6.4.9.CP, jboss-eap-6.4.10.CP,jboss-eap-6.4.11.CP,jboss-eap-6.4.12.CP,jboss-eap-6.4.13.CP,jboss-eap-6.4.14.CP

回答by Robin Raju

Use the following command from Linux

从 Linux 使用以下命令

find $JBOSS_HOME -name run.sh -exec {} -V \; | grep '^JBoss'