jsvc

How to start tomcat with jsvc?

自闭症网瘾萝莉.ら 提交于 2019-12-01 21:02:48
I'm trying to start tomcat with jsvc but it gives me this strange error JSVC re-exec requires execution with an absolute or relative path using jsvc -debug -cp ./bin/bootstrap.jar:bin/tomcat-juli.jar \ -outfile ./logs/catalina.out -errfile ./logs/catalina.err \ org.apache.catalina.startup.Bootstrap Just ran into this error myself. In my case, using the absolute path to jsvc --- /usr/bin/jsvc on my machine --- fixed it. thuong nguyenxuan I run Tomcat by double-click startup.sh file on $CATALINA_HOME/bin folder. After that, I enter this URL http://localhost:8080/ in the browser and it runs. 来源:

How to convert a java program to daemon with jsvc?

那年仲夏 提交于 2019-11-27 02:51:37
I wrote a program and now I am expected to convert it to a daemon. Since I am a noob and dont know anything about it, can you please tell me how can I do it or can you please give me basic tutorials or readings about it ? I really want to learn how I can do it ? Thank you all Java class: package example; import java.util.Date; import java.util.Timer; import java.util.TimerTask; import org.apache.commons.daemon.*; class EchoTask extends TimerTask { @Override public void run() { System.out.println(new Date() + " running ..."); } } public class Main implements Daemon { private static Timer timer