SikuliX1 icon indicating copy to clipboard operation
SikuliX1 copied to clipboard

jar file can not work correctly when use socket

Open only976 opened this issue 3 years ago • 3 comments

I finished my code in sikulixide,and it worked correctly when I run it by ide. But when I try to export as an excutable jar file and run it by java, something wrong happened. Here is the cmd info.

C:\Users\Admin>java -jar sikulix_sikuli.jar [error] Runner: runscript: (256) not found: /C:/Users/Admin/sikulix_sikuli.executablejar

I checked my code, and I found if these code were be added, this error will happen again.

import socket server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.settimeout(60) host = '127.0.0.1' port = 11223 server.bind((host, port))

But everything is all right when I use sikulixide, maybe you can copy these code to any sikulix project and generate a jar file to reappear this case.

I think something wrong happened when server.bind() were executed. Btw, if I try to use udp connection, it will crash at this line even I use sikulixide.

only976 avatar Sep 16 '22 12:09 only976

version of SikuliX?

RaiMan avatar Sep 17 '22 12:09 RaiMan

The latest version, 2.0.5

only976 avatar Sep 17 '22 12:09 only976

Well, it seems look good now, but I don't changed any code. I just delete the old jar file and generate a new one, rather than just overwrite it. Please don't close this issue, I will check if this problem happen again. If everything is ok, I will close it in a week, or I will update more detailed information.

only976 avatar Sep 17 '22 13:09 only976

no feedback

RaiMan avatar Aug 02 '23 16:08 RaiMan