Java in Debian
Since this has been source of a few lost hours in the past, it’s nice to know the Java Team has a nice solution, called ‘java-package’. This guy has a nice tutorial. He only forgets to say that you should have all dependencies of the JDK/JRE installed before running java-package (eg, run ldd on all binaries. I needed to install libxt6, libxp6, among others. apt is your friend).