oracle 如何确定正在使用的 oc4j 版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/246017/
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-09-18 17:25:21  来源:igfitidea点击:

How to determine the version of oc4j being used?

javaoracleoc4j

提问by Swapnonil Mukherjee

I have an oc4j installation bereft of any release notes or version documentation. In the absence of such documents, how do I know for sure, which version of oc4j I am using?

我有一个 oc4j 安装,没有任何发行说明或版本文档。在没有这些文件的情况下,我如何确定我使用的是哪个版本的 oc4j?

回答by Maglob

Check Server header in HTTP headers. For example with wget or curl;

检查 HTTP 标头中的服务器标头。例如使用 wget 或 curl;

wget -S <url-to-server>
curl -I <url-to-server>

or with browser, which can show HTTP headers.

或使用浏览器,它可以显示 HTTP 标头。

There should be a header something like

应该有一个类似的标题

Server: Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server

回答by John Topley

If you have access to the OC4J JAR file, you can do:

如果您有权访问 OC4J JAR 文件,则可以执行以下操作:

java -jar oc4j.jar -version

回答by dstine

You could display the OC4J-related system properties. We embed the following scriptlets into a JSP page:

您可以显示与 OC4J 相关的系统属性。我们将以下脚本嵌入到 JSP 页面中:

<%= System.getProperty( "oracle.j2ee.container.name" ) %>

and

<%= application.getAttribute( "oracle.jsp.versionNumber" ) %>

Sample output:

示例输出:

Oracle J2EE Container: Oracle Containers for J2EE 10g (10.1.3.3.0)
Oracle JSP Version: Oracle Containers for J2EE 10g (10.1.3.1.0)

Oracle J2EE 容器:Oracle Containers for J2EE 10g (10.1.3.3.0)
Oracle JSP 版本:Oracle Containers for J2EE 10g (10.1.3.1.0)

回答by RHT

Some of the methods mentioned here will not work for an Oracle Application Server and they may not be supported going forward. Also, readme.txt or other files may not be updated when a patch is applied.

此处提到的某些方法不适用于 Oracle 应用服务器,并且将来可能不再支持它们。此外,应用补丁时,readme.txt 或其他文件可能不会更新。

Recommended way is to use Oracle's official OPatch utility like this.

推荐的方法是像这样使用 Oracle 的官方 OPatch 实用程序。

OPatch]$ ./opatch lsinventory  -invPtrLoc ../oraInst.loc |grep "Oracle Application Server"

Oracle Application Server PatchSet                                   10.1.3.4.0

Ensure that the environment variable ORALCE_HOME is set correctly and -invPtrLoc pointing to the right inventory location.

确保环境变量 ORALCE_HOME 设置正确,并且 -invPtrLoc 指向正确的库存位置。

Please note that this will only work with a full installation of Oracle Application Server. It will not work for a standalone development OC4J.

请注意,这仅适用于完整安装的 Oracle 应用服务器。它不适用于独立开发 OC4J。

回答by Sten Vesterli

If you simply enter the URL of the server (like http://yourserver:yourport), you will get a welcome page stating the version.

如果您只是输入服务器的 URL(例如http://yourserver:yourport),您将看到一个说明版本的欢迎页面。

In my case, http://myserver:7777shows "Welcome to Oracle Application Server 10g (10.1.3.1.0)". If you don't know the port, try 7777, 7778 and 8888.

就我而言,http://myserver:7777显示“欢迎使用 Oracle 应用服务器 10g (10.1.3.1.0)”。如果您不知道端口,请尝试 7777、7778 和 8888。

If you know where the Oracle software is installed, go to the ORACLE_HOME/install directory and look in the readme.txt file. This will start "The installation of Oracle Application Server xx was successful", where xx is the version. If you don't know the location of the software, you could search your file system for readme.txt files - one of them is likely to document your OC4J installation.

如果您知道 Oracle 软件的安装位置,请转到 ORACLE_HOME/install 目录并查看 readme.txt 文件。这将启动“Oracle Application Server xx 的安装成功”,其中 xx 是版本。如果您不知道该软件的位置,您可以在您的文件系统中搜索 readme.txt 文件 - 其中之一可能记录您的 OC4J 安装。

回答by BlakGeek

grep Version $ORACLE_HOME/config/ias.properties