Questions tagged [application-restart]

Questions based on restarting programs in various programming languages belong in this tag.

Based on certain conditions, the entire application may need to be restarted. In these cases, it is likely that the code file in question is already being run as the main() of the application. Restarting an application at this level is not always trivial.

Since different languages may handle this differently, a question tagged with this tag must also be tagged with the programming language being used

236 questions
2
votes
2 answers

How to close form and reopen it?

I am allowing user to change some settings (language - UI culture) and to show current form in new language, I need to close form and reopen it. I am using Windows Forms. In Program.cs first I show Splash screen and then Login form and after this I…
ExpertLoser
  • 257
  • 4
  • 14
2
votes
0 answers

Reboot javafx App

I'm trying to make a function that reboot the javafx application, On windows 10 works perfectly but on Windows 7 it doesn't, I search for this solution and it was perfect, then I test it on Windows 10 and nothing, the app just turn off. Also I test…
Dan
  • 171
  • 1
  • 6
2
votes
1 answer

Nopcommerce application restart stop visual studio 2017

When I restart nopCommerce 4.0 application from admin side it always stop visual studio and as well as application. Same thing happening on Plugin install and uninstall time. It's take too much time for build and run project every time on restart…
ILYAS PATEL
  • 278
  • 1
  • 12
2
votes
1 answer

Gracefully unsubscribe from redis at exit

I have a ruby program which listens to a redis channel: module Listener class << self def listen redis.subscribe "messaging" do |on| on.message do |_, msg| Notify.about(msg) end end end def redis …
Hirurg103
  • 4,783
  • 2
  • 34
  • 50
2
votes
2 answers

Script to check if remote service is available, if not restart service and/or network

I am running a plex media server for private use on a Ubuntu 16.04 Desktop VM at home. I use it while I'm away on work during the week. Recently I've been plagued with connection issues. Sometimes it's plex itself that crashes and needs to be…
2
votes
0 answers

Activity Life Cycle OnStart is not calling after comes from background

In App, if i press home button app goes into background means OnResume() and OnStop() is called. After that i click the app from recent history OnRestart() and OnStart is not calling, app gets hang shows black screen. Im getting this…
Make it Simple
  • 1,832
  • 5
  • 32
  • 57
2
votes
0 answers

Is there such thing as an Activity crash?

I'm experiencing a very strange crash which is leaving my app running in a broken state. After getting the "Unfortunately, your app as stopped" message, the app doesn't go away but seems to just kick me back to the parent activity, as if only the…
2
votes
0 answers

Restart application if app crash or ram clear or android os release memory of the app

I want to restart application if there is a crash issue or ram clear or release of memory which will ultimately clear variables and NPE will occur. I have tried Solution 1 and Solution 2 and, public class MyApplication extends Application { …
Chitrang
  • 5,097
  • 1
  • 35
  • 58
2
votes
3 answers

Restart Ruby program internally

I'm writing a very simple dungeon adventure game in Ruby (practice for a newb). I want to address the player by name throughout, so naturally I want to be sure that if a player passes an empty name to my Player initialize method if tells them they…
DanielNordby
  • 569
  • 2
  • 6
  • 20
2
votes
0 answers

Android application restart after update

I'm facing this problem. I've a customer that has to distribute / mantain my application on ten users. They haven't the Market installed for internal policy, so I've ended up mantaining a web service for new versions check / download. Everything…
Rodolfo
  • 21
  • 5
2
votes
1 answer

Windows 8 - Exit Java Application/Process without staying in background

I have an Java application that is started via a batch-script to set environment variables etc. All works fine with Win7, but on Windows 8 the process doesn't stop completely and stays in background as I can see the javaw-process in the taskmanager.…
MedMike
  • 43
  • 1
  • 7
2
votes
0 answers

NullReferenceException thrown on Application.Restart()

I have an application that I want to automatically restart after a certain time of the day. I have a timer on the form that ticks every few minutes to see if the time condition is met. If the condition is met, Application.Restart() is passed as an…
c31983
  • 449
  • 4
  • 16
2
votes
2 answers

How to make your java application restarts itself

I want to implement reset feature in my application which cleans up some directories, copies files etc. then in order to complete the process I need to restart it. How to make application reruns itself? I think opening second instance and closing…
Yoda
  • 17,363
  • 67
  • 204
  • 344
2
votes
1 answer

How can I programmatically shutdown a node program and restart it without using any libraries?

I need to shutdown a node program and have it restart. I need to do this within the itself program without having to use something like forever needing to be setup. I know I can use process.exit() to shut the program down, but anything I can…
Brian
  • 3,264
  • 4
  • 30
  • 43
2
votes
5 answers

Is System.exit(0) really that dangerous?

An application background service updates sqlite database. Therefore my activities are becoming outdated. Activity intents also contain outdated params so onCreate, onResume will crash the application. An easiest solution is to restart whole…
Greg Dan
  • 6,198
  • 3
  • 33
  • 53