Running Java Programm as a Service

i am using java service wrapper to run my program as a service
i am getting this error i run the process by saying ./JSWrapper console
this is my
wrapper.conf
# Wrapper License Properties (Ignored by Community Edition)
# Include file problems can be debugged by removing the first '#'
# from the following line:
##include.debug
#include ../conf/wrapper-license.conf
# Wrapper Java Properties
# Java Application
wrapper.java.command=/usr/java/j2sdk1.4.2_16/bin/java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=jswrapper.Main
set.JAVA_HOME=usr/java/j2sdk1.4.2_16
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=../lib/JSWrapper.jar
wrapper.java.classpath.2=../lib/wrapper.jar
wrapper.java.classpath.3=../lib/postgresql-8.0.309.jdbc3.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib
# Java Additional Parameters
#wrapper.java.additional.1=
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=300
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
# Application parameters. Add parameters as needed starting from 1
#wrapper.app.parameter.1=jswrapper.Main
# Wrapper Logging Properties
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=../logs/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
# Wrapper Windows Properties
# Title to use when running as a console
wrapper.console.title=Test Wrapper Sample Application
# Wrapper Windows NT/2000/XP Service Properties
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=testwrapper
# Display name of the service
wrapper.ntservice.displayname=Test Wrapper Sample Application
# Description of the service
wrapper.ntservice.description=Test Wrapper Sample Application Description
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
after searching and doing google
i decided to change wrapper.java.mainclass=jswrapper.Main
this line to
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
this line which didnt solve my problem, i am getting this error
wrapper | JVM did not exit on request, terminated
wrapper | JVM received a signal SIGKILL (9).
wrapper | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
wrapper | There may be a configuration problem: please check the logs.
wrapper | <-- Wrapper Stopped

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

Similar Messages

  • Can we run java programms on Windows XP?

    Hi experts..
    I installed JDK on Microsoft Windows XP Home Edition..but i am unable to run java programmes.
    can i run java programmes on Windows XP?? if so how??
    i will be very thankful..if any one solve this problem..

    Yes, you can. There's a bunch of things you need to do (mostly setting the path environment variable). You should look at the documentation that came with the JDK, and check out the many forum responses to problems in setting up the JDK on Win 2K and Win XP.
    HTH

  • Error while running Java Application as NT Service using INSTSRV

    Hi,
    I am trying to run Java Application as an NT Service using Instsrv.But when i start the service It works fine.when i stop the service it does not stop and it continues to run the application.When i uninstall the service It still executes.When i reboot my machine it stops .Is there any solutions for this.Any help is greatly appreciated.
    Thanks.

    I actually had similar situation. I used autoexnt.ext tool (it creats a service that can be called when rebooting) to start a batch file which in turn run a java program. After the program starts, it can only be stopped through Task Manager or Ctrl-C at the dos window (it creats a dos window) or close the window directly. Stopping the service has nothing to do with the program. I feel this is reasonable because the only function of the service here is to start the application. After that the service does not (very likely) have any connection with the program so whatever you do with the service will not affect the program itself. I wonnder if you are in the same situation.
    PC

  • Urgent! Cannot run java programme. Pls help!

    1st question:
    I am using JDK 1.3.1_03 on Win2K Server. When I have compiled the java applications, I try to use
    "java <application name>" to run the programme, but an error message "Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object" come up on the screen. Why is it so? It run normally in the past.
    I have upgraded Windows2K once using the Win2K Server CD recently, is it the cause of the problem?
    How can I solve it? Please help! Thank you!
    2nd question:
    I have installed JDK1.4 Final version recently. However, after I have uninstalled it, it still appear in the Add/Remove Programme list in the control panel. I have tried to install another version of JDK, see if it would replace the JDK1.4,
    but it failed. Why is it so? Now when I go to some websites designed by javascript, the Internet Explorer suddenly closed by itself. How can I solve the problem? Please help! Thank you!

    Hi,
    I got the same problem, 1st question, running the application on win NT. Is there anybady there who can help us!!!??????????

  • Running java programme

    Hello sir/madam my name is himanshu and I have downloaded �j2sdk-1_4_1_01-windowsi586.exe� on my W98 OPS for practice purpose. I have also successfully installed it on my computer and also set following path in my autoexec.bat file �set path=%path%;c:\j2sdk1.4.1.01\bin�
    However when I am writing the java programme in notepad and saving in the c:\j2sdk1.4.1.01\bin subdirectory as �java� extension and running in MSDOS by typing the command javac & name of file to run, but instead of running it gives bad command or file name message.
    So please tell me what I have to do for running my programme successful and also whether I have to download the API for running the graphics programme after downloaded the sdk.
    Hoping for good replay.
    Thank you s

    you can do it that way too
    if you open control panel then go to System then to Advanced
    and there you will "I am not sure" Environment Variables or something like that
    there you will find you Class path you can edit it or make new one one
    if you want to edit it and but without changing it I mean that you just add you new class path to it then double click on the Class path and at the end of it add your new class path
    for example it has this value
    C:\mycompiler\bin
    To add you new class path to that let say the new class path is C:\j2sdk1.4.1_01\bin then
    To add that to the old one it should look like this
    C:\mycompiler\bin;C:\mycompiler\bin
    if you can't do it then
    download this
    http://www.textpad.com
    or
    http://www.jcreator.com

  • Running java as a daemon service in Solaris 10?

    I am looking for instructions on how to run a java program as a daemon service (e.g. running JBoss as a service) in Solaris 10 X64?
    The java-wrapper from tanuki software seems to support most platforms but not Solaris 10 on Intel 64 bit?
    Any help would be much appreciated
    Thanks in advance
    T.

    It is not that difficult to run a program as a daemon.
    $ nohup my_program my_arguments >my_output 2>my_error &

  • Run java program in background

    I want to run a java program in background in windowsXP...can anyone help please......can anyone suggest an easy software for running java program as windows service...i tried one but without any success

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • Run java program overnight

    Hey,
    I left my office yesterday evening leaving my macbook on
    while it was running a java program that it's supposed to requires between 2 and 3 hrs.
    This morning not only the program was still running (hard to believe it takes more than 12 hrs!)
    but when I typed in the shell the 'ps -all' command
    it says the program has been running for around 30 mins, and now it's still running!
    Is it possible that with certain settings the mac stops its processes after a while?
    What should I check?
    Thanks for helping, I'm actually a newbie in the mac world:)
    g

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • 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.

  • 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.

  • How to run a jms-class as a stand-alone java-Programm???

    Hi,
    I have another little question concerning jms. The jms programs I have written so far had to be executed
    as application clients using the appclient-tool. I asked myself, if it is possible to run a class
    that uses jms like a normal java-Programm with the java-command.
    Unfortunately, an exception is thrown then, because there is no initial context for the JNDI
    lookup. Is there a work around to this problem??
    THANKS.

    can you write more concretely where I can find the solution to this problem??

  • 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.

  • I can not run or compile java programme

    I am first time java programmer I can not run or compile any java programme.
    (can not read
    1 error) this is the the message that I am getting from my dos

    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    Try the tutorial.
    It sounds like your error message comes from compiling. For example, "javac mysourcecode.java" If that is correct, the most common trouble comes from using a program like Notepad on Windows to create the soruce code. The tutorial will walk your through it.

  • Different thread/memory limits when running Java via Windows Service?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

  • Run java as nt service

    Can we access Oracle database when you run a java application as a nt service.
    What do you use for run you java as nt service ?
    Thx

    I've used Java Service Launcher to run java apps as an NT service. You can find it here. There are some others too. You have to add some code to your app and include their classes, but it works.
    http://www.roeschter.com/index.html
    I don't see any reason why you couldn't access Oracle Database with it running as a service.
    James

Maybe you are looking for

  • Directory structure of file based content server

    Hi, does anybody know how the contentserver manages his directory structure? Looks like: 0ebf 0ec0 0ec1 0ec2 0ec3 0ec4 0ec5 0ec6 0ec7 I need to know the 4-digit directory in which my ID ( for example: 4bfee75d19d04548e10000000a320513) is saved. Any i

  • New bookmarks are generated with wrong adress, how to fix?

    When I want to add a new bookmark, firefox adds not the adress of the page I am currently visiting, it takes a total random one. For example: I just wanted to add: http://www.medscape.com/, so I hit the star and then went to recent bookmarks and when

  • Setting the database character set problem!

    I'm sorry if this is beaten to death, I've read the FAQ and many questions in this forum and I didn't find it. I want to change the database character set from the beginning. Where do I place the NLS_CHARACTERSET=EL8ISO8859P7 ? I know I can alter the

  • Can I get a refund on my Mac?

    I got a MacBook Pro 13 a month ago. First the fan was loud. Then my mail app was not working. Then I have problems whenever I want to turn off this computer. Now I have a crooked key after a month of use and keep in mind I barely use it! I mostly use

  • Taking Notes

    Thinking about getting one. One of the things I'd like to do with it is taking notes in meetings, etc... I played with one for ~10min in the Apple store yesterday, and I think the on-screen keyboard isn't that great for keeping up with the pace of a