How to fix missing java problem in base

I just opened a database file that I had not opened for a few weeks, and got this message:

“The LibreOffice configuration has been changed. Under Tools - Options - LibreOffice - Advanced, select the Java runtime environment you want to have used by LibreOffice.”

The path that’s offered when I go to “Tools - Options - LibreOffice - Advanced” doesn’t contain a Java runtime environment.

When I try to open any of the forms or reports, I get this message:
The connection to the data source “DatabaseName” could not be established. No Java installation could be found. Please check your installation.

Writer is working okay. I use it all the time.

Here’s my the info on my installation:

Version: 6.2.1.2
Build ID: libreoffice-6.2.1.2-snap1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); UI-Language: en-US

How do I fix this? Where can I find the lost JRE?

Can this help ? How to solve Java problem after installing LibreOffice 6.15

Hello,

Have never used snap versions so I don’t understand why the configuration was reset.

First be certain on Advanced section at the top, Use a Java runtime environment is checked. If when checked nothing then appears in the window below it, proceed with finding Java install.

Java can be installed in a variety of different places in Linux systems depending upon the distro (you don’t mention) the Java you have installed (Oracle, Open JDK) or if you just downloaded a version and extracted it to a directory of your choice (have done this a lot on Ubuntu systems). So the key is finding where yours is.

Based upon this post → Where can I find the Java SDK in Linux? the method which best worked on my Mint 18.3 install was (using terminal):

cd /
sudo find . -name 'javac'

Once you find it you can add it under Advanced by pointing to the correct folder using the Add button on top right.

Okay fixed, by playing around a little bit. I had read this above from @Ratslinger more carefully, it would have been faster:

First be certain on Advanced section at the top, Use a Java runtime environment is checked. If when checked nothing then appears in the window below it, proceed with finding Java install.

“Use a Java runtime environment” was checked, but something DID appear in the window below. It listed a JRE from Oracle Corporation, but the little circle was unchecked. Clicking that little dot, then clicking “apply” at the bottom got it fixed.

I don’t know how it got changed in the first place, but I’m glad it’s fixed.

I’m very grateful for this question and answer. Clicked the little dot, and now working.

This did not work for me. When I tried

sudo find . -name 'javac'

I got

./snap/core/7272/usr/share/bash-completion/completions/javac
./snap/core/7170/usr/share/bash-completion/completions/javac
./usr/share/bash-completion/completions/javac
find: ‘./run/user/1000/gvfs’: Permission denied

…not sure why I got Permission denied using sudo? Anyway, libreoffice base does not accept either of these three paths.

The folder you selected does not contain a Java runtime environment.
Please select a different folder.

What can I do?

I read this and had the same issue as the OP and then jvglynnjr. Here is how you fix this, it means you don’t have jre on your box. So I never show people the answers but I will today. get sudo su and do this command sudo apt install default-jre then after it installs do java -version just to make sure its there and then go into your database in libre and you can access the whole thing again. Easy fix, no messing around gets your job done.
good luck it works great for me on 18.04 ubuntu
Yours truly
TheJunkyard