How to run application as Windows Service

I have developed an appl using Java Swing. I want to run the application as Windows Service. How can I do that? Along with that, I also want to start Tomcat Server as a separate Windows service. Kindly Suggest some solutino to this!!

There is a version of Tomcat that runs as a service. (1.4 for windows?)
As for your own app, there are several free service launchers around (Google for java service etc.) Not sure about a service with a user interface though - services are usually headless. You may have to paritiotn your app into a headless service and a user interface app which communicaes by RMI, sockets or some other RPC mechanism.

Similar Messages

  • How do you create a program in Labview that can be run as a Windows Service?

    I would like to create a Labview program that can be run as a Windows service.  I have read the following Knowlegebase articles and have done what they say. 
    Creating a Windows NT Service Using LabVIEW http://www.ni.com/white-paper/3185/en 
    Running a LabVIEW Application as a Windows NT/2000/XP/Server 2008/7  User-Defined Service http://digital.ni.com/public.nsf/allkb/21BA0F671A63A60386256CB4004DF99B
    When trying to start the service I get an error that says the program didn't respond to the start in a timely manner.  I also set the "run when opened" parameter in the VI.  I am programming in Labivew 2010, proffesional version.  The server is running Windows Server 2008.  Can anyone help?  Is the ini file important in Windows Server 2008?

    I haven't looked through all those links.  But I have created Windows Services from LabVIEW executables way back when WinXP came on the market.
    The problem with services is that they have no UI.  So you can't really see what is going on.  Your EXE might be failing or hanging due to some kind of error (most liklely a security/permissions error), but you can't see the error.  So my advice is to either:
    1.  Have your EXE write lots of info to a log file.  Write info that log every step in the application.  If an error ocurrs, have it write the error info to the log file.  That is a very useful debugging tool.
    2.  Use VI Server functions to monitor the service to see what is going on. 

  • Recommendations for configuring DSEE 6.3.1 to run as a Windows service?

    Hi All, I need some recommendations for configuring DSEE to run as a Windows service. Currently I have CACAO, DSCC, and the Web Console configured and running as Windows services and this works fine. I would like to configure the directory itself to run as a Windows service so that it will restart automatically if the server reboots for any reason. Using dsadm enable-service --type WIN_SERVICE I configured this but initial testing indicated that the service will fail to start automatically on reboot. I can start it manually once the server is rebooted. This appears to indicate a dependancy of some sort with one of the other services like CACAO or DSCC but I did not see any documentation on this. Does anyone know the appropriate way to configure the directory to run as a Windows service? Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    There is an entry in the application-management-common-agent-container log
    [ Apr 22 09:17:52 Executing start method ("/opt/test/dsee6/cacao_2/usr/lib/cacao/lib/tools/scripts/cacao_smf start default") ]
    Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException:
    zone1: zone1
    Which was the problem. The zone was picking up a stale NIS map with the wrong hosname for its IP address.

  • Can we start JavaWebStart Application as Windows service

    Hi,
    Can we have JavaWebStart application as windows service?
    Thanks
    LeoSun

    Hi LeoSun,
    I dont exactly how to start this is as a window service, but if your requirement is just to start your application when the machine boots,
    then you can create a shortcut for ur webstart app, using the jnlp tag <shortcut>
    then add this shortcut to your windows startup folder.

  • Run .jar as window services.

    Hi,
    I?ve tried running .jar using batch file in window scheduler. The program will auto end if we logoff from the OS(window server 2003).
    How can we run .jar as window services, beside using Java wrapper?
    Most window wrapper need license to execute. I will like to deploy this .jar as window services in our customer side.

    You have to chose the option while creating the task as "When my computer starts", this will work as soon system boots up and until the task is explicity stopped later. This works independent of user logging into the computer; as soon the machine boots up to windows.
    If you choose "When I login" during task scheduling, the task becomes active as log as you have logged on to that desktop.
    Hope this helps.

  • How to run a remote windows dll files and the drivers of the system using j

    Dear Friends,
    I need some valuable info regd how to run a remote windows dll files and the drivers of the system using java
    reply regd thanking you

    Please don't make duplicate posts like this.

  • How to run application on comp. with only jre installed?

    Hi guys! I've written an application and somebody wants to use it. I have an applet too but it does not have full functionality and slower.
    I am running applications from my desktop using shortcut on javaw.exe file located in jdk/bin folder. No problem with it.
    But if person does not want to instsall jdk? I know that jre has javaw.exe in its bin but it does not work that way.
    My question is: how to run application for domestic use without all this web start hassle and with only jre installed? Is it possible? If yes, how to do this?
    Regards

    Download the JRE redistributable from Sun. It is self installing and will allow the user to run your app using a regular shortcut to javaw.exe.

  • How to run applications with options in IDEs like Netbeans

    Hi, I'm new to the Netbeans IDE and I'm wondering how to run applications with options.
    Normally I'd enter the following in the command line:
    java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="..." TLSServer
    java  -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="..." TLSClient localhostProblem is, I've no idea how to do the same thing in IDE's like Netbeans and I can't any settings to add options like "-Djavax.net.ssl.keyStore=mykeystore" before running the application. Any help will be appreciated.
    Message was edited by:
    Wolfgard

    Right-click the project, click properties, clicl run, and add parameters to VM Options.

  • ColdFusion 9 Application Server windows service not being created

    I've done multiple installs of CF9, both 32 and 64-bit versions, on Windows 2003 servers and the ColdFusion 9 Application Server windows service isn't being displayed in the Services console.  If I go into the registry under HKLM\System\CCS\Services - I see the key for CF9 App Server was created, but "Description" is the only subkey value that was created.  The .Net Service, ODBC Server, Search Server, Solr Service windows services are being fully created properly.
    Can anyone shed some light on why the Application Server service isn't getting registered properly and any possible fixes?
    TIA

    fargo75 wrote: Can anyone shed some light on why the Application Server service isn't getting registered properly and any possible fixes?
    TIA
    Did you check out the ColdFusion Installation Log for any relevant failures?
    Any possible firewall or security settings not allowing the ColdFusion installer creating what it needs to create?

  • Installer instal labview application as window service

    Dear NI
    I want to make an installer which installs labview application as windows service.
    Currently i am using third party tool to do this. Is it possible with labview application builder.
    regards

    It should be possible also with installer builder. You should automate described steps (put some entries into the registry and call executable from MS ResKit). Resourse kit should be deployed with same installer (not sure if there "silent" install possible, otherwise read ResKit documentation and license agreement). Alternatively you can build installer with third party tool - in this case you will have more "freedom". In the past I have done this with Inno Setup - works without problems.
    Andrey.

  • How to run jar as a service on windows 2000 server?

    Hi,
    I built a console jar program and want to run it as a service on windows 2000 server.
    May I ask how can I do it?
    Thanks

    Take a look at something called java service wrapper ,
    http://wrapper.tanukisoftware.org/doc/english/introduct
    on.htmlNot seen that one before. Ta.
    Alexandria software used to support a simpler app called JavaService... google for that maybe if the above is too much.
    /k1

  • Problem in executing client application as windows service

    Hi
    I have a client program that sends client ip address to server.
    My Requirement is to run this client program as windows service.
    For this, i have created a jar and after that i have created a .exe file.
    now using sc command in DOS i was created a service named as ClientService
    But when i am trying to start this service like other services, it is giving error saying that "The Service did not respond to the start in a timely fashion"
    Please help me in this issue

    1.Can i lock my mobile phone from J2Me Application.In J2ME you can not.
    2.How can i register J2ME application as service,means
    it started when mobile start and continously Run on my
    mobile. can these problem have a solution ,if yes then
    how..I haven't seen any device that lets you run a J2ME app at start up as a service like windowsNT. May be you can do the above two things if you dig more in to Symbian OS programming.
    Good luck
    Manas

  • App Server 8.0, run as a Windows service?

    I am running Sun Java System Application Server 8 (Platform Edition) on Windows XP.
    I want to run the app server as a Windows service.
    How can I do this?
    I looked at Sun's documentation. I could not find any information about using the app server as a Windows service.

    Some details:
    The server is started/stoped by a batch asadmin, which collect some parameters and use a java class to instantiate/stop the server. The server process then forks and will be an independent one. Moreover, the App Server is dependent of Sun Message Queue, another service it will start. This other service is called by an exe that will initiate another java process to implement this service. You end up with three process: the java process of the App Server, an exe which controls the JMS service and another java process for the JMS. The Sun Message Queue can be installed as a Windows Service itself, see the docs. App Server 7 seemed to connect cleanly to a running instance of JMS (started either as service or from console), but App Server 8 seems to require its own. I write this in a hurry and it is still an unsolved problem for me (us?), sorry.

  • Classic JVM hangs when running Tomcat as Windows Service

    Hi!
    I am running a Tomcat 3.2.4 application, written with Java 1.3.1_01.
    To run it as a Windows Service (W2000), I am using a slightly altered version of JavaService, which works fine so far: I can use both the "hotspot" and the "server" JVM's (by selecting the jvm.dll from the respective subfolder of the JDK/jre/bin folder).
    However, when I try to run the same application with the "classic" JVM, the service starts, inside of it Tomcat starts, the first output appears (to the stdout logfile) and after some time Tomcat simply hangs - it doesn't respond to anything anymore, 0% CPU, no output to logfiles anymore, doesn't even respond to normal Tomcat shutdown (e.g. when stopping the service, Windows waits the standard timeout then just kills it).
    Using the classic JVM in a console (e.g. not through JavaService and the classic/jvm.dll) works fine! No problems!
    Anyone here who can offer any help on this?
    Any hints why Tomcat may behave correctly in 5 out of six possible configurations (hotspot-server/client as service or console or classic as console) but hanging with 1 configuration (classic as service)?
    Also, on my W2000 box where this happens, the moment Tomcat hangs, I hear a Windows warning sound being played (the standard warning gong), like it happens when an info dialog pops up - only there is no dialog or whatever and the same moment Tomcat's CPU usage drops to 0% (although the app is still in startup and should do some more work for a few seconds).
    This also doesn't always happen at the same moment during startup, but each time at a different moment, e.g. I can not pin it down to something that is done during startup, it just happens a short while (sometimes earlier, sometimes later) after startup...
    Of course, I could simply say "forget classic, it's being phased out anyway", only: The SAME thing happens with IBM's Java 1.3 VM too (except for the gong sound, which seems to be Sun-JVM specific ;-)! And I would very much like my app to be able to run on IBM's VM (usually I'm using Sun's VMs everywhere, but we have a few stray W2000 boxes with SP2 where Sun's 1.3.1_0x VMs crash with our application [not hang like described above, but really crash, even when run as a console]) and on those boxes the IBM JVM in a console works fine - now I only have to get it working as a service too (and while researching why it hangs I saw that Sun's classic JVM hangs too, so I figured, I first find out why that happens, with the hope that the fix is applicable to IBM's JVM too...).
    Thanks already,
    Johannes

    re setting classpath when using JavaService
    for Win2k, Tomcat 3.3.1a, JDK1.2
    below is my script for creating/installing JavaService
    (based on Alexandria web site version). However, if i
    try to add .jar files to classpath (ie, CP environment
    variable), the service does not work. It only works
    when this single .jar file is there. How can .jar or
    .zip files be added to classpath for this service?
    I've not been working with Tomcar as a service, so can't help directly, but can offer some comments that might be of use (apologies if they aren't!).
    There are Tomcat scripts for V3.1, V3.2 and V4 with the JavaService code from Alexandria SC. Looks like you need one for V3.3 as well?
    In these others, there are fairly long lists of jar files in the classpath, so I would expect it to work correctly for the version you are using (unless there is a problem with the way that classloaders are involved, which is something that is known to get in the way for some app server-based programs).
    I would expect the classpath to work if changed from what you have listed to something like the following:
    set CP=%TOMCAT_HOME%\lib\tomcat.jar;%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME$\lib\other_library.jar
    Is that what you have tried to do, and found problems?
    Does this version of Tomcat bundle all of its resources into a single jar file (tomcat.jar), or is that a file you have created yourself?
    Is the problem found when loading and starting Tomcat itself, or from within your server-based application?
    Does it fail to load a 'standard' Tomcat library archive, or a jar file containing your own program code?
    set CP=%TOMCAT_HOME%\lib\tomcat.jar
    echo %CP%
    JavaService.exe -install "Jakarta-Tomcat"
    %java_home%\jre\bin\classic\jvm.dll
    -Djava.class.path=%CP% -Dtomcat.home=%TOMCAT_HOME%
    -Djava.security.policy=%TOMCAT_HOME%/conf/tomcat.policy
    -Xms128m -Xmx128m -start
    org.apache.tomcat.startup.Main -params start -stop
    org.apache.tomcat.startup.Main -params stop -out
    %TOMCAT_HOME%\logs\stdout.log -err
    %TOMCAT_HOME%\logs\stderr.log
    Regards,
    John Rutter

  • Which solution is better for schedules task? Console application or windows service?

    I have a "MULTI-LEVEL" XML file that I will be getting on daily basis and I want to accomplish following tasks:
    1) I have to read and parse the "MULTI-LEVEL" XML data
    2) Then I have to set or create some kind of .net service (c#) that read the xml and parse the data once a day (daily)?
    3) Now I have SOAP service from other software where I want to feed this XML data to. The schedules service will compare the XML data with software data and update (or add) based on the comparision.
    For this task, I come to conclusion that there are 2 best ways to do this:
    1) Create a console application and use windows task scheduler to run it everyday
    2) Create a windows service that runs in the background
    Which is a better way (or reliable)  solution to do this task? Please advise

    There are several things to keep in mind when writing an app that is designed to run without a user logged in. One of the most common mistakes is requiring some sort of user input.  Since the task will run without user intervention you don't want
    any sort of calls to Console.ReadLine, MessageBox.Show, etc.  They will cause the task to freeze and eventually need to be terminated.  You also don't want to rely on any sort of desktop apps running since a user may or may not be logged on at the
    time.
    Also be aware that a task can be scheduled to run under any user context.  As such you either need to ensure it runs under an account with sufficient privileges or that your app needs no special privileges.  You mentioned you tried to run it from
    bin\debug but you most likely have your project under your Documents directory.  Only you would have permissions to that folder and therefore will run into issues if the task is run under a different context.  You also mentioned you put it in the
    C:\ but users don't have write privileges to that folder and therefore if you tried to write a file out it would fail. If you need to read/write files then you should pick a common location that all users have access to or at least the one that will run the
    scheduled task. Be aware that, by default, Task Scheduler will not run a task elevated. You need to check the option to run elevated when you configure the user to run the task under.
    One of the key things to ensure you do with a task is verify it is working properly as a normal app.  You should also ensure that you have good logging so that if it does fail you can trace down the failure more easily.  One common thing that people
    tend to do in console apps is put a try-catch around the main function and display a message if an unhandled exception occurs. This is going to cause problems in a task.  Simply log the exception and rethrow it so Task Scheduler will flag the run as a
    failure.
    If you still cannot figure out why your task is failing then please add some logging and then tell us what code is being run at the time and what the failure is.

Maybe you are looking for

  • Windows 8 and CS5/CS6

    Hi I'm buying a laptop for my son who uses either CS5 or CS6. Could someone please tell me if there are any issues with installing and running either on a laptop running Win 8. The laptop we are looking at is a gaming one which has a dedicated graphi

  • Can't print with user but can with local admin

    Hello All, I'm a Windows admin learning how to support Macs in a 2003 AD environment. Here's my problem. I have a Windows 2003 AD Domain and an office of Mac clients running OSX 10.3.9. I'm using AdmitMac version 1 to connect the Mac's to AD. There's

  • IPod Nano (2nd generation) not fully compatible with BOSE SoundDock

    I can't get the remote control for my BOSE SoundDock to function with my newly purchased 2 GB iPod Nano (2nd generation). The BOSE manual states that the remote control will not function properly if the iPod doesn't have the proper (or later) version

  • AR Invoice Flat Files For Customers

    Hi All, There's a requirement to provide a data file with outstanding AR invoice to one of our customers. In this we are goning to develop a program to extract the relevant outstanding invoices.However we are going to have the following controls as w

  • Save file with high resolution progamatically

    Hello, I'm trying to export the document to JPEG and PNG formats with a resolution of 300 DPI. I'm using the following code: PIActionDescriptor desc00000178 = NULL; error = sPSActionDescriptor->Make(&desc00000178); if (error) goto returnError;  PIAct