<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic using a Java .jar file in a Python script in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-a-java-jar-file-in-a-python-script/m-p/299240#M7783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I'm trying to write a Python script for ArcMap that will call a java .jar file.&amp;nbsp; Within the Python script, if I can establish a connection to the .jar file, all I should need to do is write out one line of java code. I've been reading some of the responses to questions in this forum (in particular: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/4883-java-.esriaddin-classpath?highlight=java+addin"&gt;http://forums.arcgis.com/threads/4883-java-.esriaddin-classpath?highlight=java+addin&lt;/A&gt;&lt;SPAN&gt;), and it sounds like there are a few issues I need to consider.&amp;nbsp; Unfortunately, I'm fairly new to Python, so I have a lot of questions about this....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think the .jar file I want to use is independent.&amp;nbsp; Does this mean that I can just place the .jar file in the java/lib/ext file and call it directly in the python script, or import the .jar file at the beginning of the script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The forum I was reading talked specifically about adding a .jar file to an .esriaddin file. Do I specifically need an .esriaddin file to call a .jar file, or is this more for .esriaddin files that are written in java code? In any case, where can I go to find more information about this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I have also been looking at the "spline with barriers" script tool for ArcMap, which does use some java .jar files.&amp;nbsp; It looks like in this case the classpath needs to be established, and the java line of code parsed together using the .append method.&amp;nbsp; Is this method a better approach for what I want to do? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for any help, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abby Gleason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Mar 2013 17:49:50 GMT</pubDate>
    <dc:creator>AbgailGleason</dc:creator>
    <dc:date>2013-03-13T17:49:50Z</dc:date>
    <item>
      <title>using a Java .jar file in a Python script</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-a-java-jar-file-in-a-python-script/m-p/299240#M7783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I'm trying to write a Python script for ArcMap that will call a java .jar file.&amp;nbsp; Within the Python script, if I can establish a connection to the .jar file, all I should need to do is write out one line of java code. I've been reading some of the responses to questions in this forum (in particular: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/4883-java-.esriaddin-classpath?highlight=java+addin"&gt;http://forums.arcgis.com/threads/4883-java-.esriaddin-classpath?highlight=java+addin&lt;/A&gt;&lt;SPAN&gt;), and it sounds like there are a few issues I need to consider.&amp;nbsp; Unfortunately, I'm fairly new to Python, so I have a lot of questions about this....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think the .jar file I want to use is independent.&amp;nbsp; Does this mean that I can just place the .jar file in the java/lib/ext file and call it directly in the python script, or import the .jar file at the beginning of the script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The forum I was reading talked specifically about adding a .jar file to an .esriaddin file. Do I specifically need an .esriaddin file to call a .jar file, or is this more for .esriaddin files that are written in java code? In any case, where can I go to find more information about this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I have also been looking at the "spline with barriers" script tool for ArcMap, which does use some java .jar files.&amp;nbsp; It looks like in this case the classpath needs to be established, and the java line of code parsed together using the .append method.&amp;nbsp; Is this method a better approach for what I want to do? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for any help, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abby Gleason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 17:49:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/using-a-java-jar-file-in-a-python-script/m-p/299240#M7783</guid>
      <dc:creator>AbgailGleason</dc:creator>
      <dc:date>2013-03-13T17:49:50Z</dc:date>
    </item>
  </channel>
</rss>

