Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Java [игнор отключен] [закрыт для гостей] / Удаление процессом в винде / 3 сообщений из 3, страница 1 из 1
15.01.2017, 15:00
    #39384996
olegbank
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Удаление процессом в винде
Нужно реализовать на Java приложение ,которое снимает в Windows все процессы с пределенным именем. Как? Если конкретно ,прибить Хром с процессами плагинов
...
Рейтинг: 0 / 0
15.01.2017, 15:30
    #39385010
Паша01
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Удаление процессом в винде
аif you want to kill external processes (which you did not spawn from your Java app), then one thing you can do is to call O/S utilities which allow you to do that. For example, you can try a Runtime.exec() on kill command under Unix / Linux and check for return values to ensure that the application was killed or not (0 means success, -1 means error). But that of course will make your application platform dependent.


http://stackoverflow.com/questions/6356340/killing-a-process-using-java
...
Рейтинг: 0 / 0
15.01.2017, 18:19
    #39385052
Usman
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Удаление процессом в винде
Паша01аif you want to kill external processes (which you did not spawn from your Java app), then one thing you can do is to call O/S utilities which allow you to do that. For example, you can try a Runtime.exec() on kill command under Unix / Linux and check for return values to ensure that the application was killed or not (0 means success, -1 means error). But that of course will make your application platform dependent.


http://stackoverflow.com/questions/6356340/killing-a-process-using-java добавлю:Taskkill - https://technet.microsoft.com/ru-ru/library/bb491009.aspx Parameters/fSpecifies that process(es) be forcefully terminated. This parameter is ignored for remote processes; all remote processes are forcefully terminated/tSpecifies to terminate all child processes along with the parent process commonly known as a tree kill.
...
Рейтинг: 0 / 0
Форумы / Java [игнор отключен] [закрыт для гостей] / Удаление процессом в винде / 3 сообщений из 3, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]