Abe
Abe

Reputation: 9061

How can I view the classpath and jvm args of an executing java program in windows

In *nix I just do ps -ef | grep java to see the jvm args and classpath of an executing java program. How can I see it in windows command prompt? I want to see if certain jars are actually in the classpath of a running weblogic server.

Upvotes: 19

Views: 19205

Answers (3)

barclar
barclar

Reputation: 533

You can write a small application to connect via JMX and query the mbean java.lang.Runtime. It has an attribute "ClassPath".

import java.lang.management.*

ManagementFactory.getRuntimeMXBean().getClassPath()

Upvotes: 9

Tobias Eriksson
Tobias Eriksson

Reputation: 393

From the command line I would use

jinfo < pid >

which will give you this information and more

Upvotes: 20

sanj2sanj
sanj2sanj

Reputation: 71

You can fire up JConsole, connect to the JVM running Weblogic and then navigate to the "VM Summary" tab to inspect the classpath/vm args.

Upvotes: 7

Related Questions