Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum Linuxiarze.pl

Author Topic: [Solved] Java problem, Libreoffice cannot find java and DirsyncPro also not  (Read 221 times)

Offline Oulik

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Hope you can help.

I just installed the latest Sparky Linux 7, and it works well except for 1 pesky little problem.
The system cannot find java or the implementation of Java
I do see a link in usr/bin a java link though
That link seems to link to /etc/alternatives/ java

I have installed

openjdk-11-jre
openjdk-11-jre-headless

openjdk-16-jre
openjdk-16-jre-headless

openjdk-17-jre
openjdk-17-jre-headless

And still the system cannot find java

Later on I removed the 16 and 17 versions
Then I ran the command
java -version
This was the reply

OpenJDK Runtime Environment (build 11.0.13+8-post-Debian-1)
OpenJDK 64-Bit Server VM (build 11.0.13+8-post-Debian-1, mixed mode, sharing)

But the system cannot use it somehow.
What can be wrong?
Not LibreOffice can use it and not DirsyncPro cannot use it
« Last Edit: November 23, 2021, 08:08:07 am by Oulik »

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2274
  • Karma: 6
    • SparkyLinux
Mayby 'libreoffice-jva' package is missing.

Don't place the same post in different categories.
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at irc.libera.chat

Offline Oulik

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Hi Pavroo

I reposted the question because I thought the question was more suitable in the other section.
I did some further digging
I found this

I have 2 machines where java is working correctly.
So, I ran the command "whereis java"

On machine 1 (PCLinuxOS)
[janholtman@localhost ~]$ whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java

On machine 2 (Xubuntu)
jan@jan-OptiPlex-760:~$ whereis java
java: /usr/share/java

On the machine with SparkyLinux
jan@jan-extensa2510:~$ whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz

It seems to me that the problem is with the "java.1.gz"
How to solve this one, I don't know


Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2274
  • Karma: 6
    • SparkyLinux
What does the command say:
Code: [Select]
sudo update-alternatives --config java
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at irc.libera.chat

Offline Oulik

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
This is the reply (direct copy from the terminal)

jan@jan-extensa2510:~$ sudo update-alternatives --config java
[sudo] password for jan:
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Nothing to configure.

Offline Oulik

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Maybe this is another hint:
When launching LibreOffice from the terminal, I get this:

jan@jan-extensa2510:~$ libreoffice
Warning: failed to launch javaldx - java may not function correctly



Offline Oulik

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
Eventually I got the solution (via another forum)

The issue is / was that libreoffice-java-common was not installed (easily installed with Synaptic)
I managed to get DirsyncPro running by making a desktop launcher which points to the .sh file.
« Last Edit: November 23, 2021, 12:58:19 pm by Oulik »