Questions tagged [startup]

Startup usually refers to the processes or events that occur at the start of a program, at the beginning of execution of a code block, or when a device is first booted.

2846 questions
72
votes
12 answers

How to run a C# application at Windows startup?

I made an application that launches during startup, with the next code below. The process runs on the process manager tool after the restart, but I can't see the application on the screen. When I open the same .exe file from the startup registry…
Oded .S
  • 1,081
  • 2
  • 11
  • 18
71
votes
6 answers

How do I change the startup project of a Visual Studio solution via CMake?

I am using CMake to generate Visual Studio projects. Everything works fine except one thing. The startup project in the solution is always ALL_BUILD. How do I change the startup project to the real project I want via CMake?
giggle
  • 1,911
  • 5
  • 21
  • 25
66
votes
8 answers

Why is the JVM slow to start?

What exactly makes the JVM (in particular, Sun's implementation) slow to get running compared to other runtimes like CPython? My impression was that it mainly has to do with a boatload of libraries getting loaded whether they're needed or not, but…
Jegschemesch
  • 11,414
  • 4
  • 32
  • 37
66
votes
6 answers

How to get values from appsettings.json in a console application using .NET Core?

i'm creating a console application using .NET Core 3.1 and i would like to have an appsettings json to load all environment, paths, variables,... at the beginning of the execution, and then get values from other library classes. I have created a…
JaviL
  • 763
  • 1
  • 5
  • 5
66
votes
7 answers

How to create windows service from java jar?

I have an executable JAR file. Is it possible to create a Windows service of that JAR? Actually, I just want to run that on startup, but I don't want to place that JAR file in my startup folder, neither in the registry.
Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214
61
votes
4 answers

How can I run a Perl script as a system daemon in linux?

What's a simple way to get a Perl script to run as a daemon in linux? Currently, this is on CentOS. I'd want it to start up with the system and shutdown with the system, so some /etc/rc.d/init.d integration would also be nice, but I could always add…
jedihawk
  • 814
  • 1
  • 12
  • 12
59
votes
15 answers

Visual Studio freezes or hangs on startup

I have been using Visual Studio for a while and found that when I open visual studio and open the project all the files that were open last time remain open. This causes my Visual Studio to freeze or crash on startup. I am using a lot of plugins in…
user605334
58
votes
3 answers

Visual Studio 2015 keeps switching startup project

When changing startup project for the solution from project A (initial startup) to project B (newly added project) the change of the startup project does not appear to be saved. When running F5 VS always change back to original setting of project…
Anders Nilsson
  • 1,465
  • 12
  • 12
55
votes
2 answers

vim takes a very long time to start up

I'm experiencing a very sluggish startup time with vim as well as other unrelated programs ever since I logged out and logged back in the last time. Following is the startuptime log for vim: > times in msec clock self+sourced self: sourced…
Haitham Gad
  • 1,529
  • 2
  • 13
  • 23
54
votes
6 answers

Actually read AppSettings in ConfigureServices phase in ASP.NET Core

I need to setup a few dependencies (services) in the ConfigureServices method in an ASP.NET Core 1.0 web application. The issue is that based on the new JSON configuration I need to setup a service or another. I can't seem to actually read the…
Andrei Rînea
  • 20,288
  • 17
  • 117
  • 166
54
votes
4 answers

windows service startup timeout

Is there a way to set a different value for service startup timeout per service? I can change it using the ServicesPipeTimeout registry key, but it's per machine (http://support.microsoft.com/kb/824344). At the moment the only thing I thought about…
Meidan Alon
  • 3,074
  • 7
  • 45
  • 63
54
votes
3 answers

Is there a way to run a method/class only on Tomcat/Wildfly/Glassfish startup?

I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml. Is there a way to run a method/class only on Tomcat startup?
dcave555
  • 904
  • 1
  • 9
  • 8
52
votes
3 answers

Application startup code in ASP.NET Core

Reading over the documentation for ASP.NET Core, there are two methods singled out for Startup: Configure and ConfigureServices. Neither of these seemed like a good place to put custom code that I would like to run at startup. Perhaps I want to…
Kyle B.
  • 5,737
  • 6
  • 39
  • 57
52
votes
12 answers

How to roll the log file on startup in logback

I would like to configure logback to do the following. Log to a file Roll the file when it reaches 50MB Only keep 7 days worth of logs On startup always generate a new file (do a roll) I have it all working except for the last item, startup roll. …
Mike Q
  • 22,839
  • 20
  • 87
  • 129
47
votes
4 answers

App.xaml file does not get parsed if my app does not set a StartupUri?

Background: I'm creating a WPF app using MVVM, and using a DI container to build my ViewModels My App.xaml looks like this:
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328