Let's wrap up by outlining the recommended strategy for compiling and running your legacy code in Java 9. Here are the steps you'd ideally follow:
- Run jdeps --jdk-internals to verify if your code has any internal API access. If there are no errors, just try compiling and running your code in Java 9. For the vast majority of cases, where there are no accesses to internal JDK APIs, the code should simply just work.
- If there are errors and they are caused by your application code that you can change, follow the jdeps recommendation and fix those errors.
- If the errors are caused by libraries that are not in your control, check if there are updates published by the library authors and get the latest versions. Many libraries that use internal APIs are being updated to work with Java 9, and the fix for your libraries might have already been done and published...