Openjdk support?

I was wondering if openjdk has been or will be evaulated for use with the linux openfire server? Right now the .deb for the latest openfire specifies either sun-java5-jre or sun-java6-jre as requirements. This is really the only thing tying these packages to my system, as my other java apps seem to be doing fine with the openjdk jre. If we could get openjdk-6-jre added as an alternative in the .deb it would be a plus.

Sorry to bump the thread but I think it should be considered. I’ve modified the debian package so that it works with openJDK as openJDK is the only available javaVM to me, since Sun does not provide a PowerPC build for ppcLinux.

That is only one of the reasons why alternative jdk’s should be supported, besides that, it runs just fine over here…

OpenJDK supports (at least in Debian packages) the following platforms:

alpha amd64 armel i386 ia64 mips mipsel powerpc s390 sparc

Whereas Sun supports only:

amd64 i38

By limitting OpenFire to only Sun’s JDK you are cutting quite a few users short and although I can understand that Jive might not have the time to test everything with two JDK’s I’m not so sure the community would mind to at least be given the option to run OpenFire on any platform that has java support, whether it is Sun’s or not.

Hi,

currently http://www.igniterealtime.org/issues/browse/JM-1501 does not allow to use any other JDK, but I think that you want to modify the build process so that it installs even if no Sun JRE was found.

Anyhow one can still use the .tar.gz version.

Could you provide a patch or diff of the file or files you did modify to create a build which also works with OpenJDK?

It seems that the .rpm build includes the JVM, also there it should be possible to specify a dependency for a JRE.

LG

Righto,

Well, there seems to be a bit of an issue with this all.

I modified the debian binaries and the init-scripts for OpenFire to actually work with openJDK and it seemed to work just fine. The SASL part didn’t work of course but else the daemon started and was bound on port 9090 and I forgot all about it.

Turns out, the daemon starts, but that’s about it… I can’t get an HTTP response from it.

This however does not seem to be an openJDK only problem, I had just as little succes with sun’s java6-jre on an i386 ubuntu box…

To actually get the debian thing to install and start the following needs to be done:

edit the debian control file:

Pre-depends: java-runtime-headless | sun-java5-jre | sun-java6-jre | openjdk-6-jre-headless

That will ensure that even though sun-java*-jre will have “priority” over the openJDK binary openJDK will be installed on by Sun unsupported platforms and that if openjdk is already installed Sun’s VM is not installed next to it.

edit the initscript openfire:

if [ -z $JAVA_HOME ]
then
        t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
        t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
        t=/usr/lib/jvm/java-6-openjdk && test -d $t && JAVA_HOME=$t
fi

That is sufficient to get it all to work… Why openfire at the moment is failing both on Sun i386 and openJDK powerpc I have not yet been able to figure out…

Hi all,

I too am facing this problem. I’m trying to run Openfire 3.6.1 on Ubuntu PPC with java-6-openjdk. The server appears to start fine (no error messages at all) and the admin console also seems to bind to TCP port 9090 as defined in the default openfire.xml. However, I’m just not getting any HTTP response when trying to connect to the admin console. Has anyone been able to resolve this?

Cheers,

Mark

Thanks daenney.

I’m installing Openfire just so that I can run Google Wave, and I’m not glad about having to install Sun’s proprietary JDK just for this.

Everything else I do with Java, including my job as software developer, works fine with OpenJDK.

So far it seems to be working fine in Ubuntu 9.04 x86_64.

For others that want to try this, here are the exact steps for modifying the deb package:

  1. dpkg-deb --extract openfire_3.6.4_all.deb openfire_package
  2. dpkg-deb --control openfire_3.6.4_all.deb openfire_package/DEBIAN
  3. Open the file “openfire_package/DEBIAN/control”, and change the “Pre-Depends:” line as daenney said, to:
  Pre-Depends: java-runtime-headless | sun-java5-jre | sun-java6-jre | openjdk-6-jre-headless
  1. Open the file “openfire_package/etc/init.d/openfire”, and insert daenney’s suggestion at line 15:
          t=/usr/lib/jvm/java-6-openjdk && test -d $t && JAVA_HOME=$t

Without this line, Openfire does not give you any error message: it just exits silently.

  1. dpkg-deb --build openfire_package/ openfire_3.6.4_all_openjdk.deb

The Wave server and client work fine for now.

I installed them following exactly the standard instructions at http://code.google.com/p/wave-protocol/wiki/Installation

It would be nice to have Openfire’s bug #JM-1501 fixed so that we could use it with OpenJDK out of the box.

These are still valid instructions right? I’m preparing to write an article up and create a couple of packages for Slackware 13/64. I would like to implement this without the Sun JDK too.

Please update the *DEB package to allow OpenJDK as a dependancy instead of Sun-Java-5/6. The *.tar.gz binary in the bin folder runs fine.