Hello

I have a big problem with my program, which has the task to read data from port from connecting device and draw a chart based on them by the GUI library javaFX. Generally program works good when I’m starting this from IDE intellij, but when I do executable file .jar all GUI scene is running – I clicked “Uruchom” – Run – program is running call method with class PartialResultsTask. It’s working to condition checkPattern from Device class, which has the task to check available ports and open this one, on which device works. And in this moment program is waiting for something... I’m using JSSC library. In terminal it looks like this:

java.jpg


Even in method checkPattern I write something by System.out.println – nothing shows in terminal.

Link to code on github:
https://github.com/szubi/OpticalSmokeDetector

You can check it by: java -jar OpticalSmokeDetector.jar

I think it may be a port problem, or rather a lack of permissions to port by the jar file(maybe system blocks executing. From what I know IDE has higher permissions or something like that). Eventually I thought about maven dependencies. Maybe dependencies don’t add to the .jar file but in this case I should have an exception. Do you know how I can resolve this problem?


Greetings,
Szubi