windows service startup timeout

I agree with Romulo on finishing to start your service as soon as possible. However, if you need the time and you are using .NET Framework 2.0 or later, you might consider ServiceBase.RequestAdditionalTime() method. http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase.requestadditionaltime.aspx protected override void OnStart() { this.RequestAdditionalTime(10000); // do your stuff }

UWP app start automatically at startup

It seems that MS will add this feature – windows.startupTask – not only for converted desktop apps, but also UWP apps. You can see it from about 37:00 Tip, tricks, and secrets: Building a great UWP app for PC But this feature is not ready yet – It’ll be available with Windows 10 Fall Creators … Read more

Error starting Tomcat from NetBeans – ‘127.0.0.1*’ is not recognized as an internal or external command

Assuming you are on Windows (this bug is caused by the crappy bat files escaping), It is a bug introduced in the latest versions (7.0.56 and 8.0.14) to workaround another bug. Try to remove the ” around the JAVA_OPTS declaration in catalina.bat. It fixed it for me with Tomcat 7.0.56 yesterday. In 7.0.56 in bin/catalina.bat:179 … Read more

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

CMake now supports this with versions 3.6 and higher through the VS_STARTUP_PROJECT directory property: cmake_minimum_required(VERSION 3.6) project(foo) # … add_executable(bar ${BAR_SOURCES}) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT bar) This will set bar as the startup project for the foo.sln solution.

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

You could write a ServletContextListener which calls your method from the contextInitialized() method. You attach the listener to your webapp in web.xml, e.g. <listener> <listener-class>my.Listener</listener-class> </listener> and package my; public class Listener implements javax.servlet.ServletContextListener { public void contextInitialized(ServletContext context) { MyOtherClass.callMe(); } } Strictly speaking, this is only run once on webapp startup, rather than … Read more

Can C++ have code in the global scope?

The answer on the question you linked to was talking in a simple way, not using strict C++ naming for constructs. Being more pedantic, C++ does not have “code”. C++ has declarations, definitions, and statements. Statements are what you probably think of as “code”: if, for, expressions, etc. Only declarations and definitions can appear at … Read more