- vps ssh whenever i close, after time jar stops running.
I am new for java, i started jar file on a vps server by the command
$ java -jar MyCode.jar server sample.yml
and everything works great, but whenever i close ssh, jar file stops. Not right after i stop ssh, i don't know how long it stays alive, it varies 10min or more, but it definitely closes.
How can i fix it.
- And also where i can see all logs. For example after running this command:
$ java -jar MyCode.jar server sample.yml
I see logs, but i won't leave my notebook running forever, where i can view those logs saved somewhere.
- And also whenever i open ssh, i firstly have to kill running process and run it again
$ java -jar MyCode.jar server sample.yml
To be able to view the logs, and be sure that everything is fine. How can i connect again to the running jar process without restarting?