Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't use some features of Libreoffice (some extensions, macros) because my Java runtime environment (openJdk-6) is not recognized in my system (see [screenshot]


When launching LibreOffice from the terminal, I get:

javaldx: Could not find a Java Runtime Environment! 
Please ensure that a JVM and the package libreoffice-java-common is installed.
If it is already installed then try removing ~/.libreoffice/3/user/config  /javasettings_Linux_*.xml
Warning: failed to read path from javaldx
Fontconfig warning: "/usr/lib/libreoffice/share/fonts/truetype/fc_local.conf", line 13: Having multiple <family> in <alias> isn't supported and may not works as expected

There is a bug reported about this but the workaround suggested does not work for me (install libreoffice-base) and is additionally tagged as "won't Fix":

I tried deleting the file mentioned in the error message and re-installing both LibreOffice and openjdk-6 but to no avail... I suppose I could manually add a runtime environment from the LibreOffice Menu Options > Libreoffice > Java but I don't know which directory to choose.

Please help!

share|improve this question

Here is how I install the latest Oracle Java on my Ubuntu 12.10 (manual way, but works great):

  1. Download the latest tarball of JDK/JRE from
  2. Extract it to /usr/java: tar -xf jre-7u13-linux-x64.tar.gz -C /usr/java
    and create a symlink to the current version for convenience:
    ln -s /usr/java/jre1.7.0_13 /usr/java/latest
  3. Create symlinks so that Firefox can use it:
ln -s /usr/java/latest/lib/amd64/ ~/.mozilla/plugins/
ln -s /usr/java/latest/lib/amd64/ ~/.mozilla/plugins/

That's it - all by browsers and LibreOffice recognize and use it.

The primary drawback of this approach is that it is not a package installation, but since all files are kept in just on folder, I guess, it is okay. If I want to update java, all I have to do is untar the new archive to /usr/java and make /usr/java/latest to point at it.

share|improve this answer
Thanks Pavel! I found a ppa that is maintained and contains scripts that do just that: . For some reason now Libreoffice detects the Oracle JRE...I Would have liked to use openjdk though and I am surprized it could not work on a new system – R Pennese Feb 5 '13 at 12:37
@RPennese, thanks for the link :) – Pavel A Feb 5 '13 at 12:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.