I'm using a remote server and to clean up some amount of RAM I've restarted some (not system) services in use but I can't restart the java process because the 'service' command can't find it (isn't a service? it's an oracle-java8 installation through the official apt-get installer).
Any suggestion?
[I've readed the other questions but there is not a proper solution for my case, I don't want to execute strange scrips. sorry]
apt-get install oracle-java8-jdk/jre
would not create java as a service. It would install the JDK/JRE so that you can run jar files as such:
# java -jar myjarfile.jar
The java process on your server might have been started this way in a console or tty.
If you want to run this jar as a service, you need to create a wrapper script that supports start, stop, restart etc. (like explained here) Without a wrapper script, a java .jar program cannot be managed as a service on Linux.
If your java process was a tomcat server, as read in the comment, you could start it by manually by running
# catalina.sh start
Tomcat comes with wrapper scripts to run it as a service. If it was installed this way on your server, you could try to start it using
# sudo service tomcat8 start
See tomcat running documentation for more info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With