Created attachment 31888 [details] patch I'm integrating LiveRebel (http://liverebel.com) with Tomcat. I need a clean way how to get Tomcat scripts to start LiveRebel agent instead of Tomcat (the agent will be responsible for starting Tomcat). Currently we are patching Tomcat scripts (catalina.sh/bat and setclasspath.sh/bat); however, that is messy, as every time user updates Tomcat, those changes get overwritten. Instead, I would like to change the "java" executable that Tomcat scripts use to start Tomcat. My current solution is to set _RUNJAVA environment variable in CATALINA_BASE/bin/setenv.sh/bat and then patch CATALINA_HOME/bin/setclasspath.sh/bat not to override the setting if already set (see the attached patch). This solution is also described here: http://zeroturnaround.com/forums/topic/trouble-setting-up-live-rebel-with-tomcat-on-ubuntu/#post-45253
Fixed in 8.0.x for 8.0.11 onwards and in 7.0.x for 7.0.56 onwards. I modified the patch slightly so setclasspath.sh handled java and jdb separately. The modified patch has been proposed for 6.0.x.
This has been fixed in 6.0.x for 6.0.42 onwards.