I'm using java 1.8 with lots of pleasure.
One of my projects in my workspace needs to compile and be compatible with java 1.6, so i changed the appropriate eclipse options.
Now i get the famous message:
Build path specifies execution environment JavaSE-1.6. There are no JREs
installed in the workspace that are strictly compatible with this environment.
There are many questions and answers on how to solve this problem. So no problem there.
But what are theoretically the problems that may come up when this warning is ignored? (everything seem to be running nicely on 1.6)
One potential problem is that your 1.6-targeted code may accidentally use a class or interface that is introduced in JDK1.8. If the JRE that is associated with a 1.6 target in your workspace is actually a JRE1.8 or 1.7, the code may compile fine but you may end up with something like NoClassDefFoundError at runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With