Stop Java process


1. After login to the server where the process was running, we look for the Java process to be stopped (since the application is in Java, this should be visible in the process list). The "ps aux" command searches through all running processes and the "grep" command filters based on a key word:

ps aux |grep java

2. In order to be sure that our process is still active, we can look also for the specific name of the application:

ps aux |grep java|grep [application_name]

3.a. In case there are no other Java processes on the server (as it can be verified from the results of the first command), the easiest would be to kill all the Java processes:

killall -9 java

3.b. In case there are several Java processes running on the server, then from the results of the first command we can identify the process ID of our Java application. This process ID can then used for stopping the process:

kill -9 [process_ID]


Not responsive Java process

A Java application has crashed and needs to be restarted. In order to be able to execute the application again, the not responsive process first needs to be stopped. The application is installed on a remote server, so the operations need to be performed via remote shell.

Access your computer over internet in a secure way

Accessing you own data is getting more and more important. Part of it is already accessible from "everywhere", when stored with your emails. But "the cloud" is not that advanced yet and so there are documents you only have on your computer. Imagine you switch place for a couple of days, and still want to be able to look something up. One possibility was to create a backup and store all documents you might need on an external drive - a tedious process, and will forget the <em>one important</em> document. You could also open a port for Windows' Remote Desktop connection, but for security reasons this is not a choice. There should be a secure way to access the data.

How to remote deploy a Web service to Apache Tomcat from within a Java program

The deployment of servlets to a Servlet container like Tomcat is usually a simple task: Just copy the developed servlet to a specific target directory. The container will then hot deploy it. The proposed task is however more complex: The goal is to make a programmatical remote deployment of a Web service. In other words, an already developed Web service is to be deployed from a PC to a remote server which is running a Tomcat Servlet container. This task has three major requirements: - First, the deployment has to be remote: The Web service is to be deployed onto a different machine. - Second, it is to be accomplished programmatically, which means that it is necessary to develop a software component (for example in Java) which will carry out that task. - Third, the deployment has to be “hot”, which means that the deployed Web service has to run after a short time, without the need to restart the server or its Servlet container. As an addition to the above it is interesting to know, how to use a Servlet container like Tomcat for Web service deployment. In short the goal is to develop an application which can “hot deploy” a Servlet containing one or more Web services onto a remote machine, which is only known to run an Apache Tomcat Servlet container. The process could be called: “Programmatical-remote-hot-deployment of a Web service to an Apache Tomcat Servlet container.”

RPC in the Java Platform

In distributed computing, there is an essential need for the applications in the distributed environment to be able to use the functionalities offered by each application without knowing how these functionalities are implemented. One common possibility for this is the Remote procedure call (RPC), which is an Inter-Proccess communication that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network). Java Remote Method Invocation is the Java implementation of Remote Procedure Call. In the solution for this "Problem", we will take a look at the mechanism of Java RMI.
Subscribe to remote