auto update running html/cs/js files
I'm coming from Netbeans and looking for a similar behaviour. I just launch a standard java application with a "public static void main" method. This class loads "sparkjava" which is a very tiny/simple web framework that listens on a port and serves up html/cs/js etc.
So while my application is running, I add code to my html file and save the file. I "alt tab" to my browser, "force refresh", but the html is not updated in the page. I have to stop the running application and relaunch it.
Is there a way to get Netbeans behaviour to work here in ItelliJ? In Netbeans, "save" the file, wait one second, then force refresh and the page is loaded with new html/css/js.
Having to stop and start the application every save is taking a hit to my productivity.
I'm not looking to have my java code compiled and reloaded (Netbeans doesn't do java code redeploy either without restarting the application), I'm just looking to have the js/css/html files reloaded on a save.
Please sign in to leave a comment.
If you are deploying application to an application server, see Updating Applications on Application Servers.
If you are running application via the main method, see Reload modified classes.
I'm not deploying an application. I'm just running a standard "main" method. However your "Reload modified classes" link doesn't seem to reload js/html/css resources, that only appears to work for java classes.
I have paid for the ultimate version, so I'm sure it's not a case of me missing "paid features", I just don't understand how to get css/js/html to "update on save". Those resources are not being copied to the "executing directory" when they are being saved.
>However your "Reload modified classes" link doesn't seem to reload js/html/css resources, that only appears to work for java classes.
"Reload modified classes" action will also copy (to the module's output directory) the updated resources files if they are located in directories marked as resource roots.