tags:

views:

57

answers:

3

Can someone let me know, what will be unix command if I need to check want are the jars loaded by java..

+2  A: 

There are a couple ways to go about this.

From your java code you can call System.getProperty("java.class.path") which will return the whole classpath as a String.

You can also get the list by adding an argument on the command line java -verbose:class

dbyrne
A: 

You can use the option: java -verbose:class which shows what jars are being used

OscarRyz
+2  A: 

You can use lsof:

lsof -p <PID> | grep jar

use pgrep or jps to find the PID of your Java process.

Omry
@Omry: +1 for the OP specifically mentioning Un*x and your answer being an answer that *"thinks outside the Java box"*.
Webinator