What are the consequences of installing some el6 packages on Centos 7?

I'm responsible for administration of a Centos 7 box at my contract job. I'm really more of a developer and not much of a Linux admin, so please bear with me and maybe try to explain this to me like I'm 5.

One of the apps we're working on needed something called pdftk. Unfortunately, a dependency for it is something called libgcj. I read that libgcj is considered deprecated and no longer "ships" with the new Centos 7.

So, I did this:

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libgcj-4.4.7-11.el6.x86_64.rpm
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
rpm -ivh --nodeps libgcj-4.4.7-11.el6.x86_64.rpm
yum install pdftk-2.02-1.el6.x86_64.rpm

And yay pdftk works now. However, I've been reading around and have determined that this was a bad idea. No reasons given for why this was a stupid thing to do. So could anyone shed some light on why I shouldn't have done this? Or perhaps give me some advice or precautions I should take now? I'm afraid to restart the server or install updates until I know this won't break our box.

Thank you in advance.


This is not meant to be a complete answer, but since until now nobody has provided reasons on why this isn't procedure CAN be a bad idea:

Certain versions of packages rely on functions provided by external libraries. Those libraries change over time, and in that process possibly change their behavior or even completely remove functions. Moving from EL6 to EL7 is quite a big step, so there might be an new version of package/library XYZ, which might generally work with your installed version of the package, but not in full extent.

In your case pdftk might generally work as expected, but in some special cases there might be a function call, which won't work with the rest of the installed packages, and thus might crash or behave unexpectedly. Evaluating where this misbehavior has it's source would become very tricky then.

There might be a whole lot of other reasons not to do this, but this is the first thing I think of, and for production systems stability is key. Hence, I wouldn't mixup versions not design for a specific OS release. At least not without thorough testing.