Iv’e created a java daemon and added to the MyDaemon example. It will run fine when launched manually outside the URCap project however, it does not want to start when path added to the getExecutable() function. Anything special that needs to be done here to get it to start()?
Thank you for the suggestion. I was using an older API but changed to 1.5.0. Still not working though on simulator polyscope “5.2” or my real robot polyscope “3.8”.
There are some other suggestions in that thread I haven’t tried yet.
OK figured this out mostly. Yes, it was a simulator (or Linux) issue causing most of my headaches. Can’t start any Daemon in the simulator now. Once I got past that realization I found a way to start the java daemon just testing on the robot.
Solution:
Add a shell file to the same folder as the Java Daemon “RunMDJS.sh”.
#!/bin/bash
echo “Start MyJavaDaemonServer.jar”
java -jar MyJavaDaemonServer.jar
In the MyDaemonDaemonService.java file getExecutable: return new URL("file:com/ur/urcap/examples/mydaemon/impl/daemon/RunMDJS.sh"); // Java
However, stopping the Daemon is another issue. I would appreciate other suggestions to help make this fully functional.
I’m having exactly the same issue. I just didn’t have the time to address it jet, as manually it works well. So it’s in still in my ToDo list. I’ll try your solution and let you now if it works for me too.
And by the way, recently I had the chance to test this on a CB3.0 and it works! So the problem with MyDaemon example not being able to successfully start the daemon occurs with CB3.1 (I tested it with 3.6.1 and 3.8 fresh images on real robot, and with the SDK 1.3.55 simulator SW 3.6.0.30512 and doesn’t work). Still no chance to test it on e-Series, so I don’t know about it.