title: Unable to Access External Jar in Spark
body: <p>I am trying to run Spark locally in my Intellij and passing in an external jar with sparkConf:</p>
  <pre><code>sparkConf.set(&quot;spark.jars&quot;, &quot;C:\\path\\to\\my\\jar.jar&quot;);
  </code></pre>
  <p>I see in the console when running that the jar has been added:</p>
  <pre><code>INFO org.apache.spark.SparkContext:57 - Added JAR C:\\path\\to\\my\\jar.jar at spark://some spark path
  </code></pre>
  <p>I also see the jar in Spark UI underneath Classpath Entries:
  some-spark-path Added By User</p>
  <p>However I am running into two issues.</p>
  <p>When I tried to call upon a resource file in the external jar via code below, I get a null for the Inputstream, path would be like &quot;/file/i/need.json&quot;:</p>
  <pre><code>try(InputStream is= SomeClass.class.getResourceAsStream(path))
  </code></pre>
  <p>When I am also passing a className (this class exists in the external jar) as string to a method which then creates an instance, I get ClassNotFoundException. ClassName would be like &quot;class.i.need&quot;:</p>
  <pre><code>Class&lt;?&gt; classes = Class.forName(className);
  </code></pre>
  <p>Any advice would be helpful. Thanks!</p>
  <p>Edit: Running on Spark 3.0.0.
  I have also tried with &quot;spark.driver.extraClassPath&quot; to no avail.</p>