Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

[Solved] Java problem, Libreoffice cannot find java and DirsyncPro also not

Started by Oulik, November 20, 2021, 06:52:24 PM

Previous topic - Next topic

Oulik

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

pavroo

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 [url="//irc.libera.chat"]irc.libera.chat[/url]

Oulik

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


pavroo

Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

Oulik

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.

Oulik

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



Oulik

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.

View the most recent posts on the forum