简体   繁体   English

应用程序服务器类路径-Linux中的Java库

[英]Java libraries in appication server classpath -Linux

How to check the list of libraries (jar, properties,folders) that is in the classpath of the application which is running in the application server(webpshere 8.1)? 如何检查应用程序服务器(webpshere 8.1)中运行的应用程序的类路径中的库(jar,属性,文件夹)列表?

Does ps (process) command in linux gives all the details. linux中的ps(process)命令是否提供了所有细节。 And also , How do we checking the port number(http,admin console,soap) of the application /application server domains? 此外,我们如何检查应用程序/应用程序服务器域的端口号(http,管理控制台,soap)?

Aside from WEB-INF/lib ,WEB-INF/classes. 除了WEB-INF / lib,WEB-INF / classes。 which are the folders that application server takes deafault into classpath. 这是应用程序服务器将deafault引入类路径的文件夹。

My question is to find out the libraries that are used by server to run the application. 我的问题是找出服务器用来运行应用程序的库。

To know which jars are loaded into the JVM. 要知道哪些jar加载到JVM中。 In most conditions, 'lsof' can help you: 在大多数情况下,'lsof'可以帮助您:

lsof -a -p < pid > |grep '\\.jar' lsof -a -p <pid> | grep'\\ .jar'

You should use the Class viewer service to find out what jar files and libraries reside on the classpath. 您应该使用类查看器服务来查找类路径中的jar文件和库。

For more information: http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fttrb_classload_viewer.html 有关更多信息,请访问: http//pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic =%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fttrb_classload_viewer.html

I am not aware of the existence of WAS 8.1. 我不知道WAS 8.1的存在。 However, application classloader in WAS can output all libraries that were loaded. 但是,WAS中的应用程序类加载器可以输出所有已加载的库。 Simply call toString() on it from within any class of the application: 只需从应用程序的任何类中调用toString()

System.out.println(getClass().getClassLoader().toString())

I don't know how to specify java command line parameters for websphere, but for the standard JVM, if you want to see where the class files are loaded from, you can specify the -verbose:class parameter. 我不知道如何为websphere指定java命令行参数,但对于标准JVM,如果要查看从哪里加载类文件,可以指定-verbose:class参数。 Assuming websphere is using a standard JVM at some point, that should help. 假设websphere在某些时候使用标准JVM,那应该有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM