# How to use the third-part .jar files?

**URL:** <https://forum.universal-robots.com/t/how-to-use-the-third-part-jar-files/367>\
**Category:** URCap Development\
**Created:** [November 21, 2016, 8:49am UTC](https://forum.universal-robots.com/t/how-to-use-the-third-part-jar-files/367 "2016-11-21T08:49:48Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![anon16416181](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@anon16416181](https://forum.universal-robots.com/u/anon16416181)\
**Post date:** [August 17, 2017, 12:55pm UTC](https://forum.universal-robots.com/t/how-to-use-the-third-part-jar-files/367/8 "2017-08-17T12:55:05Z")

</div>

The problem with that asterisk (as far as I understand) is that it will tell the OSGi framework that all those dependencies are already installed and available in the classpath, which is not the case. If you take a look at where you installed the simulator, you should find the jars corresponding to `urcap.api` somewhere (look in `GUI/bundle`).

You could try two things:

- Paste those jars (your dependencies) in that directory too, leaving the POM as is and see what happens (I never tried that personally, but maybe it works)
- Try something like this:

```auto
                        < Import-Package>
                            com.ur.urcap.api*;version="[1.1.0,2.0.0)", org.osgi.*, javax.*
                        < /Import-Package>
                        <!-- This is a workaround to create a manifest that is accepted by URSIM -->
                        < Embed-Dependency>com.thoughtworks.xstream.*< /Embed-Dependency>

```

Then, add the `maven-assembly-plugin` to the POM:

```auto
            < plugin>
                < artifactId>maven-assembly-plugin</artifactId>
                < configuration>
                    < descriptorRefs>
                         < descriptorRef>jar-with-dependencies</descriptorRef>
                    < /descriptorRefs>
                < /configuration>
                < executions>
                    < execution>
                        < phase>package</phase>
                        < goals>
                            < goal>single</goal>
                        < /goals>
                    < /execution>
                < /executions>
            < /plugin>

```

When you run `mvn install`, you should see a file with the classes of your dependency packed inside, and the usual `.urcap` file with the correct manifest. Get the manifest from the `.urcap` file into the jar with dependencies, change the extension to `.urcap`, and try using it. I did that and it works (you can use something to automate extracting the manifest from one file to the other and changing the extension).

---

_[View the full topic](https://forum.universal-robots.com/t/how-to-use-the-third-part-jar-files/367)._
