Redeployment and Live Reload
Efficient development workflows rely on tools that detect code changes and automatically update the app in real time. Continuous Deployment and Dynamic Reload work together to simplify the development process by reducing manual steps, allowing you to see your changes quickly without needing to manually restart the server.
Redeployment
Redeployment in Java development refers to automatically detecting and deploying code changes, so updates are reflected in the app without a manual server restart. This process typically involves updating Java classes and web resources on the fly.
In a webforJ app, this means regenerating the WAR file whenever modifications are made to the code.
Changes to Java classes and resources on the classpath are typically monitored by the IDE. When a Java class is modified and the file is saved, either by the IDE automatically or manually by the developer, these tools kick in to compile and place the updated class files in the target directory to apply the changes.
For the best experience, use automatic redeployment in combination with tools or settings that automate browser reloading.
Live reload
Once changes are deployed, live reload automatically reloads the app so the browser reflects updates immediately, without requiring a manual browser refresh.
In a webforJ app, live reload can automatically refresh the view, re-rendering components to show the latest state of the app, or even patch changes as needed on demand.
Topics
📄️ Spring DevTools
Spring DevTools provides automatic app restarts when code changes. webforJ DevTools adds automatic browser refresh - when Spring restarts your app, the browser refreshes automatically through webforJ's LiveReload server.
📄️ JRebel
JRebel is a Java development tool that integrates with the JVM to detect code changes and replace modified classes directly in memory, allowing developers to see code changes immediately without restarting the server.
📄️ Maven Jetty plugin
The Maven Jetty plugin is a popular tool that allows developers to run Java web apps within an embedded Jetty server directly from their Maven projects.