Java Program as a Windows Service

Hi,
I was just wondering if it is at all possible to get a java program to run as a windows service? I have a program which updates a database which i could really do with simply running in the background. If anyone could help i would be most greatfull.
Chirs
P.S. If you can is it possible to schedule it to run at a certain time?

There is a free wrapper tool called JavaService I dont remember from where I downloaded it. Just do a goole search for "JavaService"

Similar Messages

  • Adding Java program as a Windows service

    Hi all,
    How can I run a Java program as a Windows service?

    There are free tools available...just google it.
    Try http://jslwin.sourceforge.net/

  • Running Java Applications as a Windows Service

    Hi,
    can any one help me to develop windows services in java.
    Running Java Applications as a Windows Service
    Any example or link please send me.
    Thanks and regards.
    Amit.

    See the Java Service Wrapper at
    http://wrapper.tanukisoftware.org/doc/english/introduction.html
    It's really good and easy to use.
    Bye.

  • Writing java program that uses UMTS service

    Hi
    I wonder if it is possible to write java programs that use UMTS services. Is there any class-package in java related with UMTS services?

    you can call a batch file using NT service. the batch file executes the java program. and you can also send an email thru that java program.

  • Java program running as win32-service

    Hi,
    I am running Java programs as Win32-Services on a Windows-Cluster with Windows 2000 Service Pack 4. I have written a Wrapper program in C which runs as a Service and creates a JVM. Normally this works fine but now I have on one cluster the problem that I don't have any output in the Console of the Service. All the output which is written with System.out.println to the console just does not appear.
    And if I read input from the console I get the following exception:
    -E-2005-02-15 16:04:44.734: java.io.IOException: The handle is invalid
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:194)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
    at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    at at.co.systema.gf.util.ConsolePrompt$ConsoleTask.run(ConsolePrompt.java:98
    Does anybody have experience with running java programs as Win32 services ?
    Ingo

    Your application needs to be able to run without System.in or System.out
    There is no console for a service.
    Replace System.out with a logger. If you need input you need to write a client which sends the commands to the service.

  • How to execute unix command from the Java program running on Windows

    Hello,
    I need to
    1. Execute a unix shell script from a Java program running on the Windows.
    2. I also need to capture the output of this shell script in my program.
    Please suggest me how to achieve this.
    Thanks in Advance.

    Hi...
    Something is missing here
    If you want to execute a shell script in windows that not posible unless you find or develop a unix shell script parser for windows.
    But if you are trying the execute a unix shell script on a remote unix computer from your java program running on a windows platform you can do that by logging on to the UNIX terminal which is running on port 23 I think.
    You can test this using telnet tool on windows
    just type on command prompt
    telnet <ip of the unix pc> <port number this case 23>
    you should get the unix terminal. If that works you can do the same through java or you can directly conect to port 23 of that pc using sockets that way your program will be platform independant

  • Execute Unix command from Java program running on windows

    Hello,
    I need to write a java program that fetches file count in a particular unix machine directory. But java program will be running on windows machine.
    The program should execute unix list command and fetch the output of that command.
    Can anyone help me on this?
    Thanks.

    Hi there,
    I had a similiar problem, though years ago. It was to have a java program execute any other. Lately, I've had to have a java program running on a unix machine execute a shell script. Entirely two different scenarios. I'm not sure what you will need for your app, but look into this:
    Java Native Interface for executing C/C++ code.
    C/C++ Code for launching the program you need to run.
    java.lang.Runtime(?).exec(....)
    With a combination of that stuff, you can make a launcher for any os that has Java running on it, and with Runtime, you can exec() pretty near any sort of unix shell or app command you'd like.
    Good luck.
    Tim

  • Making a java program work on windows xp  platforma without developer kit

    hi to you all!
    I've written some programs in java but until now I only had to compile and run them on my machine so there were no problems until now.
    I need now to write a little very easy program for a friend of mine and some other people who could need to use it. My friend said he wants a very "user-friendly" program so no command in ms dos prompt or stuff like that. I'm trying to make a .exe of my java program using "exe4j", is that good?
    second question: many of the people who will use my program have no idea of what java programming is and I don't think they want to download jdk and jre cause they won't be of any use to them, so how can I avoid this?
    is it possible?
    Thank you very much.

    Put the jre folder from your JDK install in your app folder.ok, but in this way he doesn't have to download jre
    but I have to add it to the app folder so that an
    application large just some kilobytes would become
    some megas bigger... unless I have misunderstood what
    you're suggesting me of course.Yeah, that's the downside. However, 17 MB isn't very large by todays standards.
    jre\javaw -cp <your classpath> <your main class><your classpath> is the class i need to be run's path
    or my classpath?
    jre\javaw has to be written like this or preceeded by
    the path of jre directory?As long as you point 'start in' to the correct directory, I don't believe you have to worry about that. That path you have there isn't quite right (neither was mine) but I think you've got that under control.
    You can give anm explicit path, then you can have different users with different start-in values and store their properties there automatically.

  • Run Java App as a Windows Service

    Hi,
    Is there an easy way (without 3rd party software) to run a Java app as a service in windows?
    Sorry if this isn't the right forum to post to...
    Any help would be greatly appreciated!
    Thanks in advance!

    Nope there isn't. And there also isn't a reason not to use 3rd party software as there is an excellent open source API to do this job: Java Service Wrapper.

  • Abnormal Termination of Java programs caused by windows games

    I tried to find something in the foruns and newsgroups but no luck.
    Whenever I open windows games like Broodwar/Starcraft and
    Counter-Strike and close them, my Java apps disapear.
    My apps are an IRC client and jEdit.
    Do you know why and how to solve it ?
    Thanks very much :-)
    Windows 2000
    JSDK 1.4 final

    Update the video driver, then look at the command files/batch files used (if any) by the games for setup/tear-down stuff.
    It is possible for a game to cuase any/all/certain dos-programs (Java's JVM uses Command.com) to exit, by cuasing the command interpreture (command.com) to exit and go back to windows explorer shell.
    Hope that helps.

  • Making a java program run in Windows and Linux via web applets

    Hello, this is my first post at java.sun.com
    I made an application in Linux, using Jbuilder Fundation 2005. I used the JDBC MySQL connector for Linux, and I used Mandriva as a distro. What I did is a program that allows me to connect remotely to my server, in order to update the news.
    However I want to create an applet, in which you could click a button, and the main frame of the program will load. I have no idea how to do this, since this program runs great on my linux machine, and from what I know it uses the MySQL JDBC jar that's installed on my machine, and a lot of classes from the Jbuilder program directory.
    How could I upload this program to a webpage (with the applet idea that I mentioned earlier) so that both Linux and (especially) Windows clients could use it?
    It will also be nice to know how to create a .jar file that has all of the required classes in it, I know that Jbuilder enterprise does this, but I don't have that version or plan buying it.
    Thanks in advance

    Put the jre folder from your JDK install in your app folder.ok, but in this way he doesn't have to download jre
    but I have to add it to the app folder so that an
    application large just some kilobytes would become
    some megas bigger... unless I have misunderstood what
    you're suggesting me of course.Yeah, that's the downside. However, 17 MB isn't very large by todays standards.
    jre\javaw -cp <your classpath> <your main class><your classpath> is the class i need to be run's path
    or my classpath?
    jre\javaw has to be written like this or preceeded by
    the path of jre directory?As long as you point 'start in' to the correct directory, I don't believe you have to worry about that. That path you have there isn't quite right (neither was mine) but I think you've got that under control.
    You can give anm explicit path, then you can have different users with different start-in values and store their properties there automatically.

  • Can Java program written on Windows platfrom run in Linux and Mac?

    Hi
    I am currently building a java applet in windows platform. I am wondering whether this program can be run on other platforms (Linux and Mac Os), Because the requirement of this program is to be able to run on three different platfrom (windows, linux and Mac os). Really appreciate if someone can help me
    Thank

    I can say with a high degree of certaintly that the answer is probably. Thats about 90% probably, which is a lot better than you will get with anything else. You may need to be careful of fonts and such, but GFI

  • JavaService - can install java program into win2k service, but cannot run

    i have a JavaService problem: i can install java program into win2k service, but cannot run
    the version of javaservice is 2.0.7.0
    the following is the message:
    C:\DailyUpdate\dist>JavaService.exe -install DailyUpdate C:\Program Files\Java\j
    dk1.5.0_05\jre\bin\client\jvm.dll -Djava.class.path=C:\DailyUpdate\dist\ftpbean.
    jar;C:\DailyUpdate\dist\mysql-connector-java-3.0.10-stable-bin.jar;C:\DailyUpdat
    e\dist\DailyUpdater.jar -Xms16M -Xmx64M -start DailyUpdateHandler -params C:\Dai
    lyUpdate\dist -out C:\DailyUpdate\dist\logs\out.log -err C:\DailyUpdate\dist\lo
    gs\err.log
    The DailyUpdate automatic service was successfully installed
    The DailyUpdate service is starting.
    The DailyUpdate service could not be started.
    The service did not report an error.
    More help is available by typing NET HELPMSG 3534.

    I might be doing some programming for my company soon
    which will require a program to monitor a database
    and whenever there is a change to certain fields, it
    must copy certain fields into another database. When I see "whenever thiere is a change to certain fields" I tend to think "triggers" - but maybe this won't work for you 'cause of the "another database" part. And the fact that triggers are inherently evil.
    [snip]
    Is it possible to run a Java program as a windows
    service? And if so then how would you go about it? I'd hit Google - there're a couple ways to do this.
    [snip]
    Also,...if I were to use one of those programs which
    can make an .exe of a Java program, then do you still
    require the JRE to be on the machine? It depends on how you did the conversion. If you compile to native then no, if you just wrap up a JRE then yes.
    Why I ask is
    that I occasionally get asked to do small development
    projects for my company, but we are a microsoft
    partner and therefore do all the development in C#
    and the like. So I would like to just implement as
    many things in Java as I can, just to show everyone
    that Java can do exactly what C# can do. But its
    difficult to convince people of this since I always
    require the JRE and they dont. Of course, they require the .NET framework and you don't. And last I looked that thing was around 23 Meg.

  • Can I run my java program in windows environment?

    How can i make my compiled java program run into windows environment?
    What program will i use to be able to do that?

    1. Install the JRE.
    2. Go to the command line.
    3. Type something like java myClass or java -jar myJar.jar.
    You could also use one of the many java2exe (java to executable) programs floating out there.

  • Problems with ShutdownHook and Windows Service

    Hi friends,
    I am facing a problem with the ShutdownHook when a Java program is run as a Windows Service. In the program I am having a Daemon Thread which will be run in an infinite while loop accoridng to a boolean variable. I have a shutdown hook also which sets the boolean variable so that the Daemon Thread will be stopped gracefully. When i am using Ctrl-C the shutdown Hook is started and the Thread is stopped gracefully.
    Later i have made my program as a Windows Service using a utility Java Service Wrapper. But when i stop the service though the Services Window the ShutdownHook is not getting called. I was not able to fnd out why it is happening like that.
    Any help will be highly appreciated. Thanks in advance.

    Hi Drmetz
    If you are waiting on a reply it could be some time, as this is the *Mac OS X v10.3 & earlier* forum and few here know about Windows, parallels MacBooks or the Tiger OS.
    Mac's cover a wide field.
    You could try reposting in this forum which would be your best best I think.
    Windows Compatibility forum
    http://discussions.apple.com/forum.jspa?forumID=687
    also
    MacBook forum
    http://discussions.apple.com/category.jspa?categoryID=218
    or even the Tiger Forum
    http://discussions.apple.com/category.jspa?categoryID=160
    Good luck,
    regards roam

Maybe you are looking for

  • My Ipod Nano has frozen, cannot be recognised by PC or Windows+wont charge!

    I got my Ipod Nano christmas day and it worked perfectly- no problems at all. I came home boxing day, and charged it on PC ( all the itunes were installed) and it worked fine. The day after (today 27th) I used it around 9 O'clock in the morning, it w

  • Newbie question... Can I limit the number of users ...

    Can I limit the number of users accessing a URL? My company wants to start making videos available on our intranet web site. Once published, they are planning to send an email to all our employees (5000+) to announce the video. That's a great idea...

  • Same results appear regardless of search query - Office 365

    Hi, I am currently experiencing an issue with search. Whenever I search, the same results appear regardless of the search term I used. they even appear in the same order. I could type, "policy", "test" or "sadfasdfasdfvdfb" and the same results would

  • Integration Directory Objects Transport Using the File System

    Hi I am trying to do the IR and ID Objects Transport Using the File system... I am able to Transport the IR Objects and IMport in to QA ... but when i try to Import ID objects its giving me the error...bcoz all the ID objects pointing to theSAP R/3 D

  • Windows computer not recognizing Ipod

    I have just purchased a 30gb Ipod and have tried to connect it to my computer. My wife's Ipod has no problems being recognized, and neither did mine after a few tweaks. Now it does not recognize the new ipod at all. Any suggestions on how to make thi