Java apps very slow to start - new problem

Having trouble running java apps since the stable update before the latest
This is not related to the widely discussed issue with xdg-desktop-portal-gnome causing slow start-ups
I’m running Plasma version, pretty unmodified, which runs perfectly otherwise

I’ve been hesitant to post this so far … I know there are probably no easy answers
I’m strictly a user of some java apps and know next to nothing about the intricacies

The apps seem to start ok, but high CPU usage follows and a lot of time (minutes) with no app appearing - eventually they do appear and work fine

I see the last JDK upgrade was back in Feb, so that can’t be the problem
But something in my system changed after updating back in July
And none of the java apps themselves have been updated recently

Examples are Freemind, Ancestris, Hodoku

Just though someone else may have had a similar issue …

You’re posting this in the AUR category, so I’m assuming that you installed the JDK from the AUR. Have you tried rebuilding it? :arrow_down:

pamac rebuild jdk

No, the apps are from the AUR but openJDK was installed from extra - I should try re-installing then …
I have 3 versions of JDK installed - 8, 11 and 20 - I don’t know which each app uses …

archlinux-java
archlinux-java status

https://wiki.archlinux.org/title/Java

Available Java environments:
  java-11-openjdk
  java-20-openjdk
  java-8-openjdk (default)

Maybe dont use the oldest version unless you need to?

archlinux-java set java-20-openjdk
1 Like

OK, will try that, thanks

Nice - that fixes the issue with hodoku - now starts instantly
ancestris and freemind still slow to start

I guess there is a way to start a particular .jar with a specific JDK version

The wiki suggests wrapper scripts, ex for 11:

#!/bin/sh

export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH"
exec /path/to/application "$@"

will give that a try

I inserted those lines into the launcher script
Now all java apps open flawlessly and fast
many thanks for that @cscs and @Aragorn
Didn’t think it would be so easy :slight_smile:

1 Like

Great to hear/read.
I’ll mark the post with the link to the wiki, which outlines all of the above procedures.

OK great - someone else is sure to have this issue sometime

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.