You are not logged in.

#1 2020-10-28 19:09:02

Kaguro
Member
Registered: 2020-10-25
Posts: 50

[SOLVED] Java LookandFeel on arch

Hello All.

I recently setup my Arch.
I installed openjdk-14.

My goal is to run Scilab.
It is in my experience than scilab official packages absolutely don't work. Neither did in Ubuntu back then, nor does the one from AUR. The AUR package gave me a huge list of dependencies it couldn't install... and I couldn't manually install them either.

So I downloaded the package from Scilab official website. On my last arch setup, I used to work with that.
The only thing is to create a link: libtexinfo.so.6-->libtexinfo.so.5
That used to work fine.

This time,when I run scilab I am unable to see any text..
The output is:

[kaguro@Thorin bin]$ ./scilab
Cannot find this look and feel:
[GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
	at org.scilab.modules.console.SciConsole.scilabLinesUpdate(Unknown Source)
	at org.scilab.modules.console.SciConsole$2$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
	at org.scilab.modules.console.SciConsole.scilabLinesUpdate(Unknown Source)
	at org.scilab.modules.console.SciConsole$2$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

What to do?

I am running GNOME.

Last edited by Kaguro (2020-10-30 12:05:54)

Offline

#2 2020-10-28 20:42:50

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Java LookandFeel on arch

create a link: libtexinfo.so.6-->libtexinfo.so.5

That's a bad idea to begin with because the version indicate different APIs/ABIs - at some point this *will* break, even if not right away.

AUR package gave me a huge list of dependencies it couldn't install

There're three scilab packages in AUR, an orphaned binary one that fetches the binary package from scilab and has a prominent comment to use software GL.
It also pulls ncurses5-compat-libs and I believe you actually symlinked libtinfo.so.6 ? Because, yeah, that's why you need ncurses5-compat-libs.
https://aur.archlinux.org/packages/scilab-bin/

The other two draw a lot of more AUR packages but I didn't immediately spot a dropped one - which packages did you in particular fail to install?

Offline

#3 2020-10-29 11:10:38

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

I tried with this: https://aur.archlinux.org/scilab.git
This one is exactly same: https://aur.archlinux.org/scilab-git.git

This one needs ncurses5
https://aur.archlinux.org/scilab-bin.git

When I try to install https://aur.archlinux.org/ncurses5-compat-libs.git
with makepkg -si
I get:

[kaguro@Thorin ncurses5-compat-libs]$ makepkg -si
==> Making package: ncurses5-compat-libs 6.2-1 (Thu 29 Oct 2020 04:39:42 PM IST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found ncurses-6.2.tar.gz
  -> Found ncurses-6.2.tar.gz.sig
==> Validating source files with sha256sums...
    ncurses-6.2.tar.gz ... Passed
    ncurses-6.2.tar.gz.sig ... Skipped
==> Verifying source file signatures with gpg...
    ncurses-6.2.tar.gz ... FAILED (unknown public key 702353E0F7E48EDB)
==> ERROR: One or more PGP signatures could not be verified!
[kaguro@Thorin ncurses5-compat-libs]$ 

Offline

#4 2020-10-29 11:32:28

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

So I installed  ncurses5-compat-libs by ignoring pgp signature.
I then installed the scilab-bin package from AUR.
Exactly same issue

Cannot find this look and feel:
[GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
Scilab 6.1.0 (Feb 25 2020, 10:58:38)

Offline

#5 2020-10-29 11:35:11

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,982

Re: [SOLVED] Java LookandFeel on arch

Check the pinned comment by WoefulDerelict on the aur page for ncurses5-compat-libs .

Edit: skipping signatures is often a bad idea.

Last edited by Lone_Wolf (2020-10-29 11:36:23)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2020-10-29 11:46:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,844

Re: [SOLVED] Java LookandFeel on arch

You'll probably also want to use a older JDK version if you/scilab cares about the GTK LnF I'm sure 8 still has it, not quite sure about 11

Offline

#7 2020-10-29 11:48:06

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

I don't care about look and feel.. I just want at least one installed so that I can see some text on widgets!
Switching to openjdk-8 with
archlinux-java set
didn't help either..

Last edited by Kaguro (2020-10-29 11:50:53)

Offline

#8 2020-10-29 12:07:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,844

Re: [SOLVED] Java LookandFeel on arch

Did you follow the comment about enabling software GL?

Offline

#9 2020-10-29 12:18:12

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

I must say I don't understand how to obtain a valid signature for this package.

And I've already installed this package, I'll take care from next time.

Offline

#10 2020-10-29 13:33:59

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Java LookandFeel on arch

seth wrote:

the binary package from scilab and has a prominent comment to use software GL.

V1del wrote:

Did you follow the comment about enabling software GL?

To be sure:

seth wrote:

It also pulls ncurses5-compat-libs and I believe you actually symlinked libtinfo.so.6 ? Because, yeah, that's why you need ncurses5-compat-libs.

Installing ncurses5-compat-libs *was* successful?
Because your symlink stunt has probably caused a collision ("already exists in filesystem")

Offline

#11 2020-10-29 14:02:36

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

Yeah! It said already exists in filesystem and so I deleted my symlink and successfully  installed ncurses5-compat-libs.


But on my last arch system, this ugly symlink solution worked for an entire year.

Offline

#12 2020-10-29 14:21:34

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Java LookandFeel on arch

seth wrote:
seth wrote:

the binary package from scilab and has a prominent comment to use software GL.

V1del wrote:

Did you follow the comment about enabling software GL?

Offline

#13 2020-10-29 15:34:55

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

The comment said to add LIBGL_ALWAYS_SOFTWARE=1 to the .desktop file in /usr/share/applications/
That I did. But nothing changed.

Offline

#14 2020-10-29 15:43:33

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Java LookandFeel on arch

Please post the file you created.

Offline

#15 2020-10-29 15:54:54

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

[Desktop Entry]
Comment=Scientific software package for numerical computations
Comment[fr]=Logiciel scientifique de calcul numérique
Comment[de]=eine Wissenschaftssoftware für numerische Berechnungen
Comment[ru]=Научная программа для численных расчётов
LIBGL_ALWAYS_SOFTWARE=1
Exec=/opt/scilab/bin/scilab -f %f %f
GenericName=Scientific Software Package
GenericName[fr]=Logiciel de calcul numérique
GenericName[de]=Wissenschaftssoftware
GenericName[ru]=Научный программный комплекс
Icon=scilab
MimeType=application/x-scilab-sci;application/x-scilab-sce;application/x-scilab-tst;application/x-scilab-dem;application/x-scilab-sod;application/x-scilab-xcos;application/x-scilab-zcos;application/x-scilab-bin;application/x-scilab-cosf;application/x-scilab-cos;
Name=Scilab
StartupNotify=false
Terminal=true
Type=Application
Categories=Science;Math;
Keywords=Science;Math;Numerical;Simulation

Offline

#16 2020-10-29 15:56:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,844

Re: [SOLVED] Java LookandFeel on arch

That needs to be part of the Exec line...

Exec=LIBGL_ALWAYS_SOFTWARE=1 /opt/scilab/bin/scilab -f %f %f

Offline

#17 2020-10-29 16:00:44

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Java LookandFeel on arch

If it still doesn't work please first try to run

export LIBGL_ALWAYS_SOFTWARE=1
/opt/scilab/bin/scilab

in some interactive shell (xterm etc.)

Offline

#18 2020-10-29 16:28:32

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

Tried both.
Still nothing.

I think my java doesn't have the proper files for the look and feel thing... That's why this doesn't work.
I read something about changing the LookAndFeel to metal(default of java). That doesn't work either.

Wait!
My icon just vanished!
After I edited the .desktop file to do as you said. Now I can't see the scilab icon from menu!

Offline

#19 2020-10-29 16:31:50

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

The second one (export) restores the icon.

Yeah. And it doesn't work.

Offline

#20 2020-10-29 16:33:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,844

Re: [SOLVED] Java LookandFeel on arch

Yes newer javas don't have the GTK LnF, java 8 has it still, have you switched to it like explained in https://wiki.archlinux.org/index.php/Java ? How did you switch the look and feel? There's a little too much non descriptive "doesn't work" and too little "here's what I actually did and the outputs that resulted from it" in your responses. Post exactly what you are doing and trying otherwise this results in annoying (for all of us) back and forths that are unproductive.

Offline

#21 2020-10-29 16:40:47

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

Yes I switched to version 8:

[kaguro@Thorin ~]$ archlinux-java status
Available Java environments:
  java-14-openjdk
  java-8-openjdk (default)
[kaguro@Thorin ~]$ 

Every time I said it doesn't work, it means I get the exact same error message:

[GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
	at org.scilab.modules.console.SciConsole.scilabLinesUpdate(Unknown Source)
	at org.scilab.modules.console.SciConsole$2$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
	at org.scilab.modules.console.SciConsole.scilabLinesUpdate(Unknown Source)
	at org.scilab.modules.console.SciConsole$2$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I switched the look and feel by doing this:

export _JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.metal.MetalLookAndFeel'

This produces the following error:

Picked up _JAVA_OPTIONS: -Dswing.defaultlaf=com.sun.java.swing.plaf.metal.MetalLookAndFeel
Could not create a Scilab main class. Error:
Exception in thread "main" java.lang.Error: Cannot load com.sun.java.swing.plaf.metal.MetalLookAndFeel
	at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1351)
	at javax.swing.UIManager.initialize(UIManager.java:1459)
	at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
	at javax.swing.UIManager.getInstalledLookAndFeels(UIManager.java:419)
	at org.scilab.modules.gui.utils.LookAndFeelManager.<clinit>(Unknown Source)
	at org.scilab.modules.core.Scilab.<init>(Unknown Source)

Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

Sorry, I didn't post outputs before.

Offline

#22 2020-10-29 16:42:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,844

Re: [SOLVED] Java LookandFeel on arch

What's your window manager? I'm assuming that scilab has some weird assumptions and does calcs with a not yet existing window

Offline

#23 2020-10-29 17:11:40

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

I use GNOME. So Mutter.

Offline

#24 2020-10-29 17:13:24

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [SOLVED] Java LookandFeel on arch

If you run a Gnome/Wayland session, I suggest you try Gnome/Xorg instead. Maybe scilab doesn't like xwayland or its implementation in gnome.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#25 2020-10-29 17:22:35

Kaguro
Member
Registered: 2020-10-25
Posts: 50

Re: [SOLVED] Java LookandFeel on arch

Nothing changed even in X11 session:

[kaguro@Thorin ~]$ echo $XDG_SESSION_TYPE
x11
Cannot find this look and feel:
[GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
	at org.scilab.modules.console.SciConsole.scilabLinesUpdate(Unknown Source)
	at org.scilab.modules.console.SciConsole$2$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
	at org.scilab.modules.console.SciConsole.scilabLinesUpdate(Unknown Source)
	at org.scilab.modules.console.SciConsole$2$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Offline

Board footer

Powered by FluxBB