GCube Java 8 migration guide

From Gcube Wiki
Revision as of 11:49, 16 January 2017 by Mariadigirolamo (Talk | contribs)

Jump to: navigation, search

This page collects the guidelines for the migration of D4Science infrastructure and the gCUbe software from Java 7 to Java 8. It also collects common issues (and their solution) experienced during the migration as reference for all gCube developers.

NOTE

There are (few) documented incompatibilities between Java 7 and Java 8.

Running into one of them will require to refactor the component and release a new version of it.

Java 8 compatibility guide: http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html

Source Code

Source Incompatibilities

  • Detected at integration time (the component does not build)
  • animal-sniffer-maven-plugin can be used by developers to detect them at development time

Behaviour Incompatibilities

  • Cannot be detected at development and integration time
  • We will need to carefully test our artifacts

Other Incompatibilities

JVM

JVM memory management changed in Java 8: concept of PermGen space has been replaced by Metaspace. As consequence, startup options used in Java 7 (e.g. "-XX:MaxPermSize") rae not valid anymore in JVM 8.

TODO: not enough results to provide guidelines and instructions


References

  • Oracle releases plan

http://www.oracle.com/technetwork/java/eol-135779.html

  • Compatibility guide

http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html

  • Animal Sniffer Plugin Guide

https://blog.gvsig.org/2011/07/25/hunting-api-incompatibilities-with-the-animal-sniffer-project/