You can deploy Java™ code for a JavaCompute node in a BAR file or independently in another container, such as a shared library.
You can store the Java code for a JavaCompute node in the same application as the message flow that contains the JavaCompute node. Alternatively, to share Java classes across multiple solutions, store Java code in a shared library and refer to that library from one or more applications that contain JavaCompute nodes.
Use one of the following methods to deploy your Java code.
When you update and redeploy the Java code in a shared library, those updates are available automatically to all the applications that reference that shared library. In this case, you do not need to redeploy those applications.