# Java

**URL:** https://forum.universal-robots.com/c/urcap-development/java/8.md?page=3

[Latest](https://forum.universal-robots.com/latest.md) · [Categories](https://forum.universal-robots.com/categories.md) · [Tags](https://forum.universal-robots.com/tags.md)

**Page:** 4

---

## [Persisting Data on the Service or Activator Level](https://forum.universal-robots.com/t/persisting-data-on-the-service-or-activator-level/17088)

<div class="topic-metadata">

**Author:** [@anon22196637](https://forum.universal-robots.com/u/anon22196637)\
**Replies:** 1\
**Last updated:** [October 15, 2021, 10:51pm UTC](https://forum.universal-robots.com/t/persisting-data-on-the-service-or-activator-level/17088 "2021-10-15T22:51:29Z")

</div>

I have been trying to save data to and from a file in the Activator object. I need to store some plugin specific configurations mainly to set the configuration.setUserInsertable(boolean) property in the program node serv…

---

## [Can I use ML(machine learning) in URCap?](https://forum.universal-robots.com/t/can-i-use-ml-machine-learning-in-urcap/17075)

<div class="topic-metadata">

**Author:** [@anon88193229](https://forum.universal-robots.com/u/anon88193229)\
**Replies:** 2\
**Last updated:** [October 15, 2021, 12:21pm UTC](https://forum.universal-robots.com/t/can-i-use-ml-machine-learning-in-urcap/17075 "2021-10-15T12:21:48Z")

</div>

Hi all, Can I apply ML in URCap? I’d like to analysis something with robot datas by running ML. But I’m new to Java and URCap. I have finished tutorial and I’m studying Java however, I think It is useless if I can’t …

---

## [Issues with the generateScript method](https://forum.universal-robots.com/t/issues-with-the-generatescript-method/778)

<div class="topic-metadata">

**Author:** [@anon60565098](https://forum.universal-robots.com/u/anon60565098)\
**Replies:** 4\
**Last updated:** [October 5, 2021, 6:41am UTC](https://forum.universal-robots.com/t/issues-with-the-generatescript-method/778 "2021-10-05T06:41:47Z")

</div>

With my URCap i need to add in the preamble of a program some customized functions that i'm going to recall in the main program. I've already check the samples (i.e. ScriptFunction) and this is usually done by typing …

---

## [Toolbar sample code on Polyscope 3.x CB-series](https://forum.universal-robots.com/t/toolbar-sample-code-on-polyscope-3-x-cb-series/16813)

<div class="topic-metadata">

**Author:** [@anon62734967](https://forum.universal-robots.com/u/anon62734967)\
**Replies:** 0\
**Last updated:** [October 1, 2021, 1:49pm UTC](https://forum.universal-robots.com/t/toolbar-sample-code-on-polyscope-3-x-cb-series/16813 "2021-10-01T13:49:05Z")

</div>

Hi, By definition the UR+ toolbar is not available on CB-series Polyscope 3.x, but has anyone implemented a similar function and can share a sample code here? I think it should be technically possible to create a very …

---

## ['Use joint angles' in MoveJConfigBuilder missing?](https://forum.universal-robots.com/t/use-joint-angles-in-movejconfigbuilder-missing/16258)

<div class="topic-metadata">

**Author:** [@anon62734967](https://forum.universal-robots.com/u/anon62734967)\
**Replies:** 3\
**Last updated:** [September 17, 2021, 12:09pm UTC](https://forum.universal-robots.com/t/use-joint-angles-in-movejconfigbuilder-missing/16258 "2021-09-17T12:09:22Z")

</div>

Hi, I would like to create a MoveJ program node with ‘Use joint angles’ option, but can’t find a corresponding member in MoveJConfigBuilder class. Using API 1.12. Is this not yet implemented in the SDK or should I us…

---

## [Scrip communicator](https://forum.universal-robots.com/t/scrip-communicator/16443)

<div class="topic-metadata">

**Author:** [@anon92786336](https://forum.universal-robots.com/u/anon92786336)\
**Replies:** 2\
**Last updated:** [September 16, 2021, 2:37pm UTC](https://forum.universal-robots.com/t/scrip-communicator/16443 "2021-09-16T14:37:35Z")

</div>

Hello I have a question. I must program a URCap to save six values from the Modbus. For this i take the Script communicator sample from jbm. Now i have write this and it runs, but it need 5 seconds to update the value.…

---

## [Script Exporter](https://forum.universal-robots.com/t/script-exporter/16320)

<div class="topic-metadata">

**Author:** [@anon32693620](https://forum.universal-robots.com/u/anon32693620)\
**Replies:** 1\
**Last updated:** [September 15, 2021, 8:40am UTC](https://forum.universal-robots.com/t/script-exporter/16320 "2021-09-15T08:40:25Z")

</div>

I was looking to use the ScriptExporter as provided in this post ScriptCommunicator. I wanted to test retrieving Pose data from a pose\_trans calculation as a string but I seem to always receive a null value back. Is ther…

---

## [Help with Developing Installation node](https://forum.universal-robots.com/t/help-with-developing-installation-node/16137)

<div class="topic-metadata">

**Author:** [@oe1](https://forum.universal-robots.com/u/oe1)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 9:57am UTC](https://forum.universal-robots.com/t/help-with-developing-installation-node/16137 "2021-08-30T09:57:13Z")

</div>

Hi! My name is Oliver and i’m a Automation and Robotics student. I only have some previous knowledge about coding from a quick course in Python and STL. I’m at my first internship and in charge of a super exciting pro…

---

## [How to detect the boot state of the robot?](https://forum.universal-robots.com/t/how-to-detect-the-boot-state-of-the-robot/15889)

<div class="topic-metadata">

**Author:** [@anon85711977](https://forum.universal-robots.com/u/anon85711977)\
**Replies:** 1\
**Last updated:** [August 23, 2021, 1:59pm UTC](https://forum.universal-robots.com/t/how-to-detect-the-boot-state-of-the-robot/15889 "2021-08-23T13:59:01Z")

</div>

I want to run a script every time the robot is started but AFTER it powered its 24V outputs on the controller. This normally happens once the robot has completed booting. Is there any flag that shows this state of the r…

---

## [How to access Program Contribution Configuration from Installation Node](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808)

<div class="topic-metadata">

**Author:** [@s.bucholc](https://forum.universal-robots.com/u/s.bucholc)\
**Replies:** 5\
**Last updated:** [August 23, 2021, 12:02pm UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808 "2021-08-23T12:02:22Z")

</div>

Hi everyone! My goal is to achieve functionality where user I’ll be able to turn on/off (show/hide) some URCaps from the installation node. To hide program node I need set configuration.setUserInsertable in program node…

---

## [Script command for receive Modbus data](https://forum.universal-robots.com/t/script-command-for-receive-modbus-data/15990)

<div class="topic-metadata">

**Author:** [@anon92786336](https://forum.universal-robots.com/u/anon92786336)\
**Replies:** 4\
**Last updated:** [August 23, 2021, 11:05am UTC](https://forum.universal-robots.com/t/script-command-for-receive-modbus-data/15990 "2021-08-23T11:05:39Z")

</div>

Hi I musst write a URCap and would like to receive any Data from the Modbus. I have test it with a function in the UR robot program. (picture 1) That works fine. Now I have the script Communicator and test it in this …

---

## [Retrieve Joint Positions in RobotPositionCallback](https://forum.universal-robots.com/t/retrieve-joint-positions-in-robotpositioncallback/15547)

<div class="topic-metadata">

**Author:** [@anon32693620](https://forum.universal-robots.com/u/anon32693620)\
**Replies:** 0\
**Last updated:** [July 20, 2021, 7:00pm UTC](https://forum.universal-robots.com/t/retrieve-joint-positions-in-robotpositioncallback/15547 "2021-07-20T19:00:26Z")

</div>

Hello, I am looking to retrieve the actual joint positions of a waypoint in the “RobotPositionCallback” but the joint positions I receive from “PositionParameters.getJointPositions” are different from what a normal waypo…

---

## [Interne Roboter Variable ins Toolbar zeigen](https://forum.universal-robots.com/t/interne-roboter-variable-ins-toolbar-zeigen/15308)

<div class="topic-metadata">

**Author:** [@anon1326619](https://forum.universal-robots.com/u/anon1326619)\
**Replies:** 0\
**Last updated:** [July 6, 2021, 9:20am UTC](https://forum.universal-robots.com/t/interne-roboter-variable-ins-toolbar-zeigen/15308 "2021-07-06T09:20:01Z")

</div>

Hallo zusammen, Wie kann man interne Roboter-Variable ins Toolbar (UR+) zeigen? Grüße, Nikolaj

---

## [Toolbar und Bilder](https://forum.universal-robots.com/t/toolbar-und-bilder/15307)

<div class="topic-metadata">

**Author:** [@anon1326619](https://forum.universal-robots.com/u/anon1326619)\
**Replies:** 0\
**Last updated:** [July 6, 2021, 9:08am UTC](https://forum.universal-robots.com/t/toolbar-und-bilder/15307 "2021-07-06T09:08:26Z")

</div>

Hallo zusammen, Wie kann man ins Toolbar ein Bild zeigen lassen? Grüß, Nikolaj

---

## [Relative paths to scripts](https://forum.universal-robots.com/t/relative-paths-to-scripts/8628)

<div class="topic-metadata">

**Author:** [@je1](https://forum.universal-robots.com/u/je1)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 2:05pm UTC](https://forum.universal-robots.com/t/relative-paths-to-scripts/8628 "2021-06-28T14:05:50Z")

</div>

Hi all, I am having problems with using relative paths for reading script files from resources folder. Could any of you provide a small code sample of that? I would be very thankful, I’ve tried different methods and I s…

---

## [Set GPbi to freedrive from Installation Node](https://forum.universal-robots.com/t/set-gpbi-to-freedrive-from-installation-node/15056)

<div class="topic-metadata">

**Author:** [@anon44063908](https://forum.universal-robots.com/u/anon44063908)\
**Replies:** 2\
**Last updated:** [June 24, 2021, 8:54am UTC](https://forum.universal-robots.com/t/set-gpbi-to-freedrive-from-installation-node/15056 "2021-06-24T08:54:37Z")

</div>

Hi, I am trying to set the action of GPbi\[64\] to freedrive. I have looked on the forum and found similar topics like this one. Where it is set in runtime. Yet I would like to know if it is possible to set it from the…

---

## [Extend DataModel](https://forum.universal-robots.com/t/extend-datamodel/14959)

<div class="topic-metadata">

**Author:** [@anon43657986](https://forum.universal-robots.com/u/anon43657986)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 8:20am UTC](https://forum.universal-robots.com/t/extend-datamodel/14959 "2021-06-24T08:20:16Z")

</div>

My workmate and me are creating a URCap and we need to store values of a custom class inside of the DataModel. Obviously there is no default method to include this data type. Is there any way to extend the DataModel in o…

---

## [Overlapping images in an URCap](https://forum.universal-robots.com/t/overlapping-images-in-an-urcap/14851)

<div class="topic-metadata">

**Author:** [@anon25659016](https://forum.universal-robots.com/u/anon25659016)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 3:01pm UTC](https://forum.universal-robots.com/t/overlapping-images-in-an-urcap/14851 "2021-06-14T15:01:16Z")

</div>

Hello everybody: I’m learning how to use Java Swing and UR Cap SDK, slowly making some progress. I’m trying to make a Program Node in a URCap. I am able to manage variables, nodes, waypoints… even I found out how to ins…

---

## [GUI alignment swing](https://forum.universal-robots.com/t/gui-alignment-swing/14718)

<div class="topic-metadata">

**Author:** [@anon2596383](https://forum.universal-robots.com/u/anon2596383)\
**Replies:** 1\
**Last updated:** [June 7, 2021, 9:27am UTC](https://forum.universal-robots.com/t/gui-alignment-swing/14718 "2021-06-07T09:27:10Z")

</div>

I am developing a urcap for the cb3 series. I want to be able to test the swing code that I write before deploying on the simulator or robot. My problem is that Universal Robot alters the implementation of the code I w…

---

## [Cant shutdown ursim](https://forum.universal-robots.com/t/cant-shutdown-ursim/14616)

<div class="topic-metadata">

**Author:** [@anon97098873](https://forum.universal-robots.com/u/anon97098873)\
**Replies:** 3\
**Last updated:** [May 31, 2021, 8:51am UTC](https://forum.universal-robots.com/t/cant-shutdown-ursim/14616 "2021-05-31T08:51:34Z")

</div>

I cant shutdown the ursim GUI. When I try to close the application, i get the following error message in the terminal: 11:17:21.689 WARN - Unknown shutdown sequence initiated {thread: Thread-8 , loggerClass: com.ur.pol…

---

## [Using Gripper Manager to control Robotiq Gripper](https://forum.universal-robots.com/t/using-gripper-manager-to-control-robotiq-gripper/13969)

<div class="topic-metadata">

**Author:** [@jan.cremer](https://forum.universal-robots.com/u/jan.cremer)\
**Replies:** 10\
**Last updated:** [May 20, 2021, 11:50am UTC](https://forum.universal-robots.com/t/using-gripper-manager-to-control-robotiq-gripper/13969 "2021-05-20T11:50:06Z")

</div>

Greetings to the UR community! I am currently writing a URCap that needs to access the Gripper for open/close actions in a generic way. Basically i created a node similar to the example pick and place application. So …

---

## [Splitting a string](https://forum.universal-robots.com/t/splitting-a-string/888)

<div class="topic-metadata">

**Author:** [@anon82484413](https://forum.universal-robots.com/u/anon82484413)\
**Replies:** 5\
**Last updated:** [May 13, 2021, 4:20am UTC](https://forum.universal-robots.com/t/splitting-a-string/888 "2021-05-13T04:20:32Z")

</div>

I got a string, which I am trying to split up. The string looks like 50.5|70|10 and I am trying to get the different parts into different text fields. String\[\] slices = getSettings().split("|"); part\_diameterText…

---

## [Adding an instruction before my URCap](https://forum.universal-robots.com/t/adding-an-instruction-before-my-urcap/14240)

<div class="topic-metadata">

**Author:** [@m.lupu](https://forum.universal-robots.com/u/m.lupu)\
**Replies:** 0\
**Last updated:** [May 10, 2021, 3:22pm UTC](https://forum.universal-robots.com/t/adding-an-instruction-before-my-urcap/14240 "2021-05-10T15:22:13Z")

</div>

Hello, Is it possible to add an instruction (normal node or custom urcap node) before my URCap node? And also if it’s possible to search the root program node for MyOtherUCap nodes? i’ve tried the following code and it…

---

## [Should I add a Feature to DataModel?](https://forum.universal-robots.com/t/should-i-add-a-feature-to-datamodel/13165)

<div class="topic-metadata">

**Author:** [@anon3164729](https://forum.universal-robots.com/u/anon3164729)\
**Replies:** 4\
**Last updated:** [May 3, 2021, 2:09pm UTC](https://forum.universal-robots.com/t/should-i-add-a-feature-to-datamodel/13165 "2021-05-03T14:09:44Z")

</div>

In createfeatureswing sample, in CreateFeatureInstallationNodeContribution a feature is created by: featureContributionModel = apiProvider.getInstallationAPI().getFeatureContributionModel(); Feature feature = featureCon…

---

## [JOptionPane keyboard](https://forum.universal-robots.com/t/joptionpane-keyboard/6783)

<div class="topic-metadata">

**Author:** [@anon89006500](https://forum.universal-robots.com/u/anon89006500)\
**Replies:** 8\
**Last updated:** [April 30, 2021, 5:52am UTC](https://forum.universal-robots.com/t/joptionpane-keyboard/6783 "2021-04-30T05:52:13Z")

</div>

Hi, I am showing a JOptionPane with an textbox like this: This is the code: String s = (String)JOptionPane.showInputDialog( frame, "Complete the sentence:\\n" + "\\"Gre…

---

## [3D representation](https://forum.universal-robots.com/t/3d-representation/13543)

<div class="topic-metadata">

**Author:** [@jzamora](https://forum.universal-robots.com/u/jzamora)\
**Replies:** 2\
**Last updated:** [April 13, 2021, 7:36am UTC](https://forum.universal-robots.com/t/3d-representation/13543 "2021-04-13T07:36:03Z")

</div>

I’d like to know if anyone has been able to render 3D objects (like CAD files) in a URCap. The idea would be to do something similar to how the robot is rendered in PolyScope (with rotation, zoom, etc.). Any suggestions …

---

## [ComboBox in ToolBar (not working) with Polyscope 5.8.3 in robot](https://forum.universal-robots.com/t/combobox-in-toolbar-not-working-with-polyscope-5-8-3-in-robot/10133)

<div class="topic-metadata">

**Author:** [@b.pamarthi](https://forum.universal-robots.com/u/b.pamarthi)\
**Replies:** 1\
**Last updated:** [March 29, 2021, 6:59am UTC](https://forum.universal-robots.com/t/combobox-in-toolbar-not-working-with-polyscope-5-8-3-in-robot/10133 "2021-03-29T06:59:23Z")

</div>

Hello URCap developers, I wrote an URCap that has a combo box in tool bar. I can see the combo box in the tool bar but it is always shown as empty and I used combobox.setEnabled(false) to disable the combo box and it…

---

## [Creating a modbus unit from Java](https://forum.universal-robots.com/t/creating-a-modbus-unit-from-java/12975)

<div class="topic-metadata">

**Author:** [@anon25659393](https://forum.universal-robots.com/u/anon25659393)\
**Replies:** 1\
**Last updated:** [March 18, 2021, 12:54pm UTC](https://forum.universal-robots.com/t/creating-a-modbus-unit-from-java/12975 "2021-03-18T12:54:34Z")

</div>

Hello! I would like to pre-fill/pre-create a ModBus unit, so it would be visible from polyscope in Installation/Fieldbus/MODBUS menu. I tried using secondary client and sending this command: def test(): modbus\_add\_sig…

---

## [Script wrapping in Java Swing](https://forum.universal-robots.com/t/script-wrapping-in-java-swing/12974)

<div class="topic-metadata">

**Author:** [@vineeth1](https://forum.universal-robots.com/u/vineeth1)\
**Replies:** 4\
**Last updated:** [March 16, 2021, 3:16pm UTC](https://forum.universal-robots.com/t/script-wrapping-in-java-swing/12974 "2021-03-16T15:16:54Z")

</div>

Hello, I am looking for an example of wrapping a script in Java swing. I have an example with HTML, but I am looking for one with Java swing. Kind Regards, Vineeth Panambur Venkatraman

---

## [EventFunction for multiple InputFields](https://forum.universal-robots.com/t/eventfunction-for-multiple-inputfields/1573)

<div class="topic-metadata">

**Author:** [@anon29260635](https://forum.universal-robots.com/u/anon29260635)\
**Replies:** 2\
**Last updated:** [February 2, 2018, 2:05pm UTC](https://forum.universal-robots.com/t/eventfunction-for-multiple-inputfields/1573 "2018-02-02T14:05:47Z")

</div>

Hello everyone, I’m relatively new to the URCaps universe and currently writing on a URCap for my first project. Now the problem is that i need an Installation node with multiple InputFields and all of them should be s…

[Previous page](https://forum.universal-robots.com/c/urcap-development/java/8.md?page=2)

[Next page](https://forum.universal-robots.com/c/urcap-development/java/8.md?page=4)
