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
2010-05-05 21:41:24
A:
You can use the option: java -verbose:class
which shows what jars are being used
OscarRyz
2010-05-05 21:46:16
+2
A:
You can use lsof:
lsof -p <PID> | grep jar
use pgrep or jps to find the PID of your Java process.
Omry
2010-05-05 21:52:24
@Omry: +1 for the OP specifically mentioning Un*x and your answer being an answer that *"thinks outside the Java box"*.
Webinator
2010-05-05 22:20:24