What / who asked you to do this?
Keep in mind that if you are using the Processing IDE, it comes with its own version of Java already built-in to PDE – you do not need to install, change, or upgrade any system Java, either for Mac or Windows. PDE comes with the right Java, batteries included.
If you are trying to develop Processing applications in something like Eclipse – so, programming in Java in a non-Processing IDE, using Processing as a library rather than a language – then you will want to install a correct version of Java as a library available to Eclipse – again, you don’t need to mess with the Mac or Windows system Java at all, and you can install multiple Javas side-by-side as resources. The recommended version if you plan to build Processing 3 is JRE 8u202:
Although if you are planning on creating libraries / tools / applications in Eclipse then Java 10/11 may work just fine for you.