Z-Desktop 7.2.8 Java Not Found -SOLVED with WORKAROUND

A Forum to provide feedback, and report issues about Zimbra Desktop Beta or Release Candidate versions
Locked
alex_rhys-hurn
Posts: 32
Joined: Sat Sep 13, 2014 12:50 am

Z-Desktop 7.2.8 Java Not Found -SOLVED with WORKAROUND

Post by alex_rhys-hurn »

Hi,

I am using Ubuntu 16.04 LTS.

Here is my Java setup, as you can see I have correctly selected the 32bit Java (in this case java-9 but i have tried with java-8 too):

Code: Select all

update-alternatives  --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-9-openjdk-i386/bin/java        1090      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  2            /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java    1080      manual mode
* 3            /usr/lib/jvm/java-9-openjdk-i386/bin/java        1090      manual mode
Press <enter> to keep the current choice[*], or type selection number: 
My Java version is:

Code: Select all

java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195526.buildd.src)
OpenJDK Server VM (build 9-internal+0-2016-04-14-195526.buildd.src, mixed mode)
Then I proceed to install ZImbra Desktop, and I get this error:

License Terms for this Zimbra Desktop Software: http://www.zimbra.com/license/zimbra_public_eula.html

Code: Select all

------------------------------
(A)ccept or (D)ecline [A]: A

WARNING: ia32-libs is missing for x86_64 platform. This package is required to run Zimbra Desktop on 64-bit Linux.

Java SE Runtime Environment (JRE) not found. Please install JRE 1.6 or later.
I have worked with installing Zimbra Desktop on Ubuntu many times, and understand this.

I am having exactly the same with Zimbra Desktop 7.2.7

Anyone else having this problem? Have any ideas?

Alex
Last edited by alex_rhys-hurn on Fri May 20, 2016 6:23 pm, edited 1 time in total.
PriteshGajjar
Outstanding Member
Outstanding Member
Posts: 310
Joined: Tue Mar 31, 2015 4:59 am

Re: Z-Desktop 7.2.8 Java Not Found

Post by PriteshGajjar »

Can you confirm all steps mentioned at https://wiki.zimbra.com/wiki/Installing ... top_64bits.
alex_rhys-hurn
Posts: 32
Joined: Sat Sep 13, 2014 12:50 am

Re: Z-Desktop 7.2.8 Java Not Found

Post by alex_rhys-hurn »

Hi,

Thanks for the response.

I should have said that I was using that wiki article.

Yes, I have followed that procedure, and everything works, except that I had to change gcc-4.6-base:i386 to gcc-4.9-base:i386

Otherwise everything is exactly the same.

Alex
PriteshGajjar
Outstanding Member
Outstanding Member
Posts: 310
Joined: Tue Mar 31, 2015 4:59 am

Re: Z-Desktop 7.2.8 Java Not Found

Post by PriteshGajjar »

Alex,

I think ZD is failing to capture version information from output of "java -version" command.

e.g. zimbra@ubuntu:~$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
OpenJDK Client VM (build 24.95-b01, mixed mode, sharing)

In above output the version is mentioned using string "java version "1.7.0_95". And current logic of ZD script looks for such pattern.

And for open-jdk 9 you are getting version information in different format. I guess that's the problem.

As you mentioned you have already tired 1.8, Do you mind checking "java -version" with 1.8?
alex_rhys-hurn
Posts: 32
Joined: Sat Sep 13, 2014 12:50 am

Re: Z-Desktop 7.2.8 Java Not Found

Post by alex_rhys-hurn »

Hey. Thanks for the interest and support.

Code: Select all

java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK Server VM (build 25.91-b14, mixed mode)
and

Code: Select all

update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-9-openjdk-i386/bin/java        1090      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java    1080      manual mode
  3            /usr/lib/jvm/java-9-openjdk-i386/bin/java        1090      manual mode

Press <enter> to keep the current choice[*], or type selection number:
alex_rhys-hurn
Posts: 32
Joined: Sat Sep 13, 2014 12:50 am

Re: Z-Desktop 7.2.8 Java Not Found

Post by alex_rhys-hurn »

It looks like there is no openjdk-7-jre and openjdk-7-jre:i386 in the repos for Ubuntu 16.04, only Java 8 and 9.

I could add a ppa for openjdk 7 but dont really want to do that on this machine, but if it is helpful for you I could spin up a VM for you.

Let me know.

Cheers!

Alex
alex_rhys-hurn
Posts: 32
Joined: Sat Sep 13, 2014 12:50 am

Re: Z-Desktop 7.2.8 Java Not Found - SOLVED WITH WORKAROUND

Post by alex_rhys-hurn »

Hi.

Success.

I edited the install.pl file and commented out the following on line 145.

Code: Select all

else { print "Java SE Runtime Environment (JRE) not found. Please install JRE 1.6 or later.\n"; exit; }
to look like

Code: Select all

#   else { print "Java SE Runtime Environment (JRE) not found. Please install JRE 1.6 or later.\n"; exit; }
with the intention of making the script ignore the output of the java -version check.

The installation proceeded fine, and zimbra desktop is running fine with java 8 on ubuntu 16.04

Thanks for pointing me to a workaround,

Cheers!

EDIT:

Background for others. This problem is specifically related related to Ubuntu 16.04 which includes penjdk-8 by default and openjdk-9 as an option. The output of java -version is different than what the install.pl of zdesktop is looking for, so the installed fails.

This workaround will likely solve the issue of installing zdesktop 7.2.7 as well but I havent tried it. It may also work for other *nixes that are including openjdk versions higher than 7.
v1rtu4l
Posts: 36
Joined: Tue Jun 28, 2016 3:04 pm

Re: Z-Desktop 7.2.8 Java Not Found -SOLVED with WORKAROUND

Post by v1rtu4l »

You could comment out the whole Java check at the bottom of the script where the sub is actually called. that is what I did

Gesendet von meinem SM-N910F mit Tapatalk
Locked