You are not logged in.

#1 2021-12-28 20:23:23

EgidioCaprino
Member
Registered: 2016-03-13
Posts: 105

Can't load SWT library as regular user

Hi all,

I installed swt from AUR.

When I run java -classpath /usr/share/java/swt.jar my.jar as root it works fine, but when I run it as a regular user it says it can't find the library.

These are the permissions

% ls -lha /usr/share/java/swt*     
lrwxrwxrwx 1 root root   12 Dec 28 14:10 /usr/share/java/swt.jar -> swt-4.21.jar
-rw-r--r-- 1 root root 1.2M Dec 28 14:10 /usr/share/java/swt-4.21.jar

Why is that? I'd expect Java to be able to read and load that JAR as a regular user.

Last edited by EgidioCaprino (2021-12-28 20:24:15)

Offline

#2 2021-12-28 20:27:13

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: Can't load SWT library as regular user

Please post the complete error message.

Offline

#3 2021-12-28 23:41:14

EgidioCaprino
Member
Registered: 2016-03-13
Posts: 105

Re: Can't load SWT library as regular user

tucuxi wrote:

Please post the complete error message.

It's this one:

Unable to find SWT jar for Linux : amd64

Offline

#4 2021-12-30 14:42:03

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: Can't load SWT library as regular user

Weird. What version of java do you use and do root and the regular user run the same java executable?

Offline

Board footer

Powered by FluxBB