# HMI URcap error - ToolBar project

**URL:** <https://forum.universal-robots.com/t/hmi-urcap-error-toolbar-project/13781>\
**Category:** URCap Development\
**Created:** [April 20, 2021, 12:53pm UTC](https://forum.universal-robots.com/t/hmi-urcap-error-toolbar-project/13781 "2021-04-20T12:53:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon11878051](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@anon11878051](https://forum.universal-robots.com/u/anon11878051)\
**Post date:** [April 20, 2021, 12:53pm UTC](https://forum.universal-robots.com/t/hmi-urcap-error-toolbar-project/13781/1 "2021-04-20T12:53:52Z")

</div>

Hello,

I’m trying to develop a custom HMI to control the robot cycle from a simple GUI, and to do so i’m trying to use the Toolbar exemple from github ([GitHub - UniversalRobots/MyToolbar: URCap sample that mainly demonstrates the principle of SwingToolbarService and SwingToolbarContribution](https://github.com/UniversalRobots/MyToolbar)).

I managed to compile the project with maven, then I activated the urcaps in the simulator and reboot it as requested.

But when the simulator start again, i got this error (see the picture attached) and nothing is related with the sample project itself, it seems that something else is wrong.

Thanks you in advance for your help,

Clément

 ![ur_bug](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/b/bab53ffd034c5b6367b564802b4e4c99eba1f32b.png)

---

<div class="post-metadata">

**Author:** ![anon87732236](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@anon87732236](https://forum.universal-robots.com/u/anon87732236)\
**Post date:** [April 20, 2021, 3:31pm UTC](https://forum.universal-robots.com/t/hmi-urcap-error-toolbar-project/13781/2 "2021-04-20T15:31:15Z")

</div>

Hello,

Have a look at [this](https://forum.universal-robots.com/t/toolbar-error-ursim-cant-be-open/12594) post. Somebody already stumbled upon this issue and found the cause.

---

<div class="post-metadata">

**Author:** ![anon11878051](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@anon11878051](https://forum.universal-robots.com/u/anon11878051)\
**Post date:** [April 21, 2021, 7:20am UTC](https://forum.universal-robots.com/t/hmi-urcap-error-toolbar-project/13781/3 "2021-04-21T07:20:03Z")

</div>

Hello,  
Thanks for your answer.

The problem is that this is the default project, I did not change anything in the code. Here is the syntax of the Service.java

And the default Icon is located in “/src/main/ressources/icons” (even with the complete path in the code, the error occurs.

Finally, even when i remove the URCap from “/home/ur/ursim/ursim-5.10.0.106288/programs.UR5” and restart the simulator, I’ve got the same error and it crashes.

ToolbarService :  
 ![ur_Service](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/5/597ca2d390f01620535320a7618ad1e7fdd28a9c.png)

Project tree:  
 ![ur_Project_tree](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/e/eda715fb85400f6223f4899044dda8be39f477ae.png)

Thanks,

Clément

---

<div class="post-metadata">

**Author:** ![anon87732236](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@anon87732236](https://forum.universal-robots.com/u/anon87732236)\
**Post date:** [April 21, 2021, 3:41pm UTC](https://forum.universal-robots.com/t/hmi-urcap-error-toolbar-project/13781/4 "2021-04-21T15:41:31Z")

</div>

Hi @anon11878051 ,

> [@anon11878051](#):
>
> Finally, even when i remove the URCap from “/home/ur/ursim/ursim-5.10.0.106288/programs.UR5” and restart the simulator, I’ve got the same error and it crashes.

Removing the URCap from the programs folder does not uninstall the URCap, you should use the PolyScope interface to do this.

Here are some steps I recommend you follow.

- Manually uninstall the My Toolbar URCap through the PolyScope GUI.
- Download a clean copy of the repository.
- Open the pom.xml file
- Modify the \<ursim.home\> path to point to a version of ursim you have installed.  
It should look something like this: _\<ursim.home\>/home/ur/ursim/ursim-5.9.4.1031232/\</ursim.home\>_
- Open a terminal inside the _com.ur.urcap.examples.mytoolbar_ folder.
- Run this command: mvn install -P ursim

These steps should be sufficient to have a working URCap inside URSim.
