title: List all additional jars loaded in pyspark
body: <p>I want to see the jars my spark context is using.
  I found the code in Scala:</p>
  <pre class="lang-sh prettyprint-override"><code>$ spark-shell --jars --master=spark://datasci:7077 --jars /opt/jars/xgboost4j-spark-0.7-jar-with-dependencies.jar --packages elsevierlabs-os:spark-xml-utils:1.6.0
  
  scala&gt; spark.sparkContext.listJars.foreach(println)
  spark://datasci:42661/jars/net.sf.saxon_Saxon-HE-9.6.0-7.jar
  spark://datasci:42661/jars/elsevierlabs-os_spark-xml-utils-1.6.0.jar
  spark://datasci:42661/jars/org.apache.commons_commons-lang3-3.4.jar
  spark://datasci:42661/jars/commons-logging_commons-logging-1.2.jar
  spark://datasci:42661/jars/xgboost4j-spark-0.7-jar-with-dependencies.jar
  spark://datasci:42661/jars/commons-io_commons-io-2.4.jar
  </code></pre>
  <p>Source: <a href="http://bailiwick.io/2017/08/11/list-all-additional-jars-loaded-in-spark/" rel="nofollow noreferrer">List All Additional Jars Loaded in Spark</a></p>
  <p>But I could not find how to do it in PySpark.
  Any suggestions?</p>
  <p>Thanks</p>