This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JRUN Recompile/Reload

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic