I use the excellent XMind mind-mapping tool. Moving from Linux Mint 13 (Ubuntu 12.04 LTS) to Xubuntu 14.04 LTS revealed a problem with the way XMind was packaged for Ubuntu. It had a hard-coded dependency on specific versions of the Java runtime - either of openjdk-6-jre, oracle-java6-jre, sun-java6-jre or sun-java5-jre. That wouldn’t do. The 14.04 LTS uses openjdk-7.
Of course, the DEB package is built to support the widest range of Java runtimes and on some systems, they can go back up to Java 5 - when Sun Microsystems was still alive. But that should not be a reason to force up-to-date systems to pull in older runtimes. We can let XMind know about the issue and wait for them to update the dependencies and rebuild the package. Or we can do it ourselves.
$ mkdir -p extract/DEBIAN $ mkdir build # dpkg-deb -x package.deb extract/ # dpkg-deb -e package.deb extract/DEBIAN [ ... do something, e.g. edit the control file ... ] # dpkg-deb -b extract build
The control file was edited as follows:
-Depends: libgtk2.0-0 (>= 2.8.0), openjdk-6-jre | oracle-java6-jre | sun-java6-jre | sun-java5-jre +Depends: libgtk2.0-0 (>= 2.8.0), default-jre | openjdk-6-jre | oracle-java6-jre | sun-java6-jre | sun-java5-jre
Now, the package will first check for the default Java package on the system and then move on to its list of specific runtimes.