0

I have this application coded in Eclipse IDE 03-22 that uses the jserialcomm jar library and some others like PostgreSQL. When I export it as a Runnable JAR file (whether by extraction or packaging), I found that the jserialcomm needs a .dll (.so for Linux) for making it work.

When this dll is called by the .jar, I get the Exception "Access is denied" (showing the jar's location in a temporary folder, and not inside the .jar package). If I run the application with administrator privileges, it works properly.

By user requirement, I can't let him run it in Administrator mode because the program must start automatically on system startup and it can't do it that way.

How could I arrange the jar files or what could I do in order to prevent this?

EDIT 1: "(Acceso denegado)" means "(Access is denied)". Exception ocurred exactly at the moment of calling the methods of the .jar.

John
  • 165
  • 1
  • 8
  • You should not require administrator permissions to use the serial port, or to link with a native library (dll or so file). Your question is not answerable in its present form. – Elliott Frisch Mar 20 '22 at 17:14
  • @ElliottFrisch what do you think that may be happening in the screenshot I added then? We can clearly see from the 5th line the .dll trying to be accesed and failing because of missing privileges. – John Mar 20 '22 at 19:17
  • Well, there's a `FileNotFoundException`. Try [changing the ownership](https://stackoverflow.com/a/33445728/2970947) of the dll. If the user can't open that file you would get that error. – Elliott Frisch Mar 20 '22 at 20:54

0 Answers0