aspose file tools*
The moose likes Other Java Products and Servers and the fly likes JRUN Recompile/Reload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "JRUN Recompile/Reload" Watch "JRUN Recompile/Reload" New topic
Author

JRUN Recompile/Reload

Nick Delauney
Ranch Hand

Joined: Sep 28, 2002
Posts: 43
Hello,

I am under the impression that settting the following parameter to true in the jrun-web.xml file would allow java files to be recompiled instantly upon saving. This would allow me to never have to restart the server while developing. However this is not happening for me. Does anyone use JRUN and have an Idea of what the problem could be?

< !-- reload & compile -->
< !-- These values tell Jrun how to handle changes to Servlets -->
< !-- reload=true means to reload the class if it has changed -->
< !-- compile=true means recompile java file if it has changed -->
< !-- This can be handy for development, but must be false for production -->

<reload>true</reload>
<compile>true</compile>


Thanks,


N.D:"Anything worth having, takes time to get"
Owee Nicolas
Ranch Hand

Joined: Jun 16, 2002
Posts: 49
Hi,

It's possible that the components of your application uses a different class loader than the J2EE-based components. In order to force the helper classes to be reloaded (allowing any changes to show up), you can do one of the following:

1. Restart the JRun server.

Restarting the JRun server will cause the helper class (and everything else) to reload, making the new/modified class file accessible. Since restarting a server can be time consuming and disruptive, an easiest solution to this problem is to:

2. "touch" the web.xml file of the web application.

Making and saving a minor modification to the web.xml file (or using the Unix "touch" command to update the file's modification date) will cause the entire application (including the modified helper class) to redeploy, without having to restart the server.

Hope that helps!


Owee<br />SCJP 1.4
 
wood burning stoves
 
subject: JRUN Recompile/Reload