This article explains the usage of the  ExpandClasspath JAR, which helps in the listing all the jars present in the classpath.


Usage:


java -cp <classpath>:expand-classpath-1.0.jar ExpandClasspath


Example:


java -cp /opt/infoworks/lib/extras/dt/*:/opt/infoworks/df/udfs/*:/opt/infoworks/df/apache-tomcat-8.0.33/lib/*:/opt/infoworks/bin/df-commons.jar:/opt/infoworks/bin/tools.jar:/opt/infoworks/lib/spark-jackson/*:/opt/infoworks/lib/df/*:/opt/infoworks/lib/google_collections/json-simple-1.1.1.jar:/opt/infoworks/lib/mongodblogger/logger.jar:/opt/infoworks/lib/mongodblogger/log4mongo-java-0.7.4.jar:/opt/infoworks/lib/mongodb/mongo-java-driver-3.8.0.jar:/usr/hdp/current/spark2-client/jars/*:/usr/hdp/current/spark2-client/jars/*:/usr/hdp/current/hive-client/lib/*:/usr/hdp/current/hive-client/lib/*:/usr/hdp/current/hive-webhcat/share/hcatalog/*:/usr/hdp/2.6.4.0-91/hive-hcatalog/share/hcatalog/*:/usr/hdp/lib/impala/lib/*:/opt/infoworks/lib/impala-jdbc-41/*:/etc/hive/conf/*:/usr/hdp/hive/hive-2.1/conf/*:/etc/spark2/conf/:/usr/hdp/current/spark2-client/conf/:`hadoop classpath`:/opt/infoworks/platform/bin/notification-common.jar:/opt/infoworks/platform/bin/platform-common.jar:/opt/infoworks/platform/lib/notification-client/*:expand-classpath-1.0.jar ExpandClasspath