my messy solution. i don't know if there are sideeffects. so far no:

  1. rename the old project to xxxxx_old
  2. create new project xxxxx with initial java7 environment
  3. close eclipse
  4. copy content of folder xxxxx_old to xxxxx
  5. start eclipse. no compilation error anymore for my constructor zipfile(1,2)

i would really like to know the right way. i only gave this solution for probably help other peoples with the same issue. use this method on your own risk! its messy.


here are the exact steps in case anyone in the future needs them:

  1. in the package explorer window, right-click your project and select "properties" from the context menu, or go to file > properties.

  2. in the properties dialog window, select "java build path" from the left sidebar menu, then click the libraries tab on the right-hand side.

  3. select your 'jre system library' and click the "edit..." button. assuming you have the latest jre installed, you should be able to change the "execution environment" there.

  4. if not, go to "alternate jre:" and click the "installed jres..." button.

  5. assuming you don't see the one you want listed, click "add...", ensure "standard vm" is selected, click "next", click "directory" and navigate to your new jre root folder (i.e., "c:\program files\java\jre1.8.0_20").

  6. once you click "finish" and then "ok", you should be able to switch back to "execution environment" and select the jre you desire.

  7. click "finish" and then select "java compiler" from the left sidebar menu. double check that under jdk compliance you have "use compliance from execution environment...." checked.

now your project should compile and run under the new jdk/jre.

Related Query