Support cross-compilation
Java9+ allows us to use --release flag to support cross-compilation. It is time to discuss about migrating to jdk9+ or other LTS.
related link: https://openjdk.org/jeps/247 related issue: #5068
On the server side, it is necessary to use an updated runtime environment to generally improve performance. Does this suggestion want to modify the default compile level?
What can we benefit from this if we migrate to jdk9+?
Migrating to jdk9+ will bring some compatibility issues, such as accessing jdk.internal.ref.Cleaner may case illegal reflective access exception.
Sorry, maybe I am a little bit off the topic about supporting cross-compilation.
IMO, cross-compilation coule be an important feature while RocketMQ is often used in different runtime.
Upgrading java version to 9+ is a solution that can alleviate this problem, and it could keep developer away from the usage which is not compatible with current compiler and the version we specified(e.g java8). As we all know, java8 is old enough even though we have to make RocketMQ compatiable with it in the foreseeable future. But --release and higher java version is not the silver bullet, which means that we still need to notice that whether the developer introduced incompatible dependencies in the pull request unconsciously.
At the end, I think we need to build a more robust cross-compilation mechanism to make it works all the time, and I also think there will be other better solutions could help us to achive it.
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
This issue was closed because it has been inactive for 3 days since being marked as stale.