Mendix 4 is long out of support. You really need to look at moving your application to a long term support version of Mendix as that will support Java 8.
Mendix 7 is the lowest version of the platform that is currently under long term support. The following link gives you an overview of support and timelines to help plan your migrations.
Just a wild guess: nobody has tried this before. So do not get your hopes up for an elaborate response, but you never know. You probably have some compelling reason for still being on Mendix 4.7.1, probably custom java or just because a long time ago an upgrade failed and the company/customer did not want to try it again. Yet, my advise, do upgrade, and not to the lowest possible version, but to the highest possible version, 9.12.2 currently. You get about 6 years of extra development and functions for free.