How to start a java application as windows 2000 service?

Hi all,
I'm trying to start / stop a java application as a windows 2000 service. But nothing appens (I can see the screen that rapidly display the java help prompt and then disappear)
I've a working directory i.e C:\MyDir and it contains instsrv.exe, srvany.exe and my application jar MyApp.jar
I'm using instsrv.exe to register a java application as a service ( C:\MyDir\instsrv MyApp C:\MyDir\srvany.exe )
I've added a key in registry by running regedit
The key is under the tree HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyApp
the key value is Parameters
in the key I've added a string value "Application" with the value "C:\j2sdk1.4.2_01\bin\java.exe"
and a string value "AppParameters" with the value "-classpath C:\MyDir\MyApp.jar main" where main is the name of the main class application.
This seems to run correctly with Windows NT 4.0
But doesn't work with Windows 2000.
Can anyone help me?? pls.
Thanks.
Max

I'm replying to myself .... ;-) ahah
All we need for this purpose is JavaService, at link
http://www.alexandriasc.com/software/JavaService/index.html

Similar Messages

  • How to schedule a java application via Windows Scheduler

    I can't figure out how to schedule a java application using the Windows Scheduler. Do I schedule the java application with the .class file as a parameter? How do I pass arguments to it?
    To execute FileCopy.class, my best guess was:
    Start | Control Panel | Performance and Maintenance | Scheduled
    Tasks | Add Scheduled Task | Browse | Program Files | Java |
    jre1.5.0_06 | ... Advanced Properties
    Under the Task tab:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe"
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy
    FileCopy"
    This does not work. How do I schedule the FileCopy.class java application, and how can I pass arguments to it? Can this be done without specifying a password?
    TIA,
    John

    Suppose that your class is FileCopy (has no package name) and is located under MyDocuments\Eclipse_Workspace\Java_File_Copy folder, then you should have:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe" FileCopy
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy"
    And yes you must provide a user password to execute the task.
    Best way to do this is to create a special user (with password) for executing this task.
    Regards

  • How to start a java application from a website

    hey does anyone know how i can start my java application, when a user clicks a button on my website. I dont want to convert to applet because it will be quite hard plus im gonna have to cut down alot of functionalities? thanks!

    [http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp]
    Kaj

  • How to start a java application by double clicking just like windows gui?

    Hi,
    I want to open the user-defined file in my java application. The way is like the notepad in windows:1.double click the file name 2.the file is opened in the java application 3.if this file has opened at the same time ,then the last opened will be read-only.
    Could you tell me how to carry it out ? Thank you
    from Maria

    !!! Please give me a help! i am thirsty for itSo, to get this straight, you have a Java application in a jar. For some reason, you do not execute this directly. Are you aware that you can execute a jar directly without the need to write a C++ exe to do it?
    Anyway, for some reason, instead you have a C++ application which launches the JVM with your jar main class.
    Well, you want to do two things. First of all, on Windows level, you need to associate the file type of your user file with your application. Note that they have to have a specific file extension that you choose. To associate the file type with an executable, you open a windows explorer, go to View, Folder Options, File Types and add an entry for your file type and specify it to open with your application. If you do not know how to do this, google for "windows associate file type with program executable" or something alike.
    Now, if you double-click one of your user files, the associated exe will open, and it will receive the file name as a command line argument. In your C++ application, you will need to pass this argument, a file name, to the Java application where you launch it.

  • How to start a Java application on Mac OS

    Hello,
    I am not sure whether this post would be appropriate to this community, but with the hope to find the answer to the question we have I'll try:
    We are fairly new to Java Technology. We had the task to develop an application for Windows OS, and have successfully completed the job. BUT, we decided to go a bit further and see how our program would behave on Mac OS.
    Unfortunately, we have never dealt with Macs before, thus don't have any idea on how to make the application run on Mac OS platform.
    With Windows we have no problem, went by the most simple way by creating a .cmd file with "java name_of_file" string. Is there any similar simple way to start our small program on Mac OS?

    There are many options:
    From Terminal (similar to ms-dos prompt, if you didn't know it already):
    If you have "java MyApp" in your myapp.cmd, you can execute it with:
    sh myapp.cmd
    Another option is to set myapp.cmd as executable:
    chmod u+x myapp.cmd
    and then from Terminal: ./myapp.cmd
    Third and best option is to make an executable jar. Then you only have to double-click .jar -file to launch your application (and no need to go to Terminal).

  • How to start a Java application

    How do I start to a application?I have the SDK but where do I go to start it I cant seem to find it.
    Thank you

    Get a basic java programming book.
    Maybe try something like JFrameBuilder which has a test version for free.
    Available at
    http://www.mars3000.com/
    You will then be able to generate some code easly that you can look at and see some simple examples.
    rykk

  • Running a Java Application in Windows

    Hi, Can anyone tell me how to run a Java Application in Windows? I've tried to run it using TextPad 4.5 but it gives me an exception saying it can't find a class defenition. I'm actually using IBM VisualAge for Java to develop the app and it runs fine INSIDE VisualAge and I've exported my compiled class files and so on, to run it stand-alone in Windows. I'm using some custom objects and inner classes, could these be the problem?

    YES! SUCCESS! I exported my class files from VAJ and along with the manifest file that it adds automatically. I opened up the jar with Winrar, extracted the manifest file and added the Main-class: header pointing to my executable and then put it back in the jar with winrar. And PRESTO! I can now run it with javaw! Thanks for your help peeps...

  • Starting and stopping applications via a Java-application on Windows/Unix

    Hello,
    I want to start java and other applications via a java application.
    This java application should start several different applications on windows and
    on unix systems and take care of their current state (e.g. running/not running).
    For all applications to be started there are .sh-scripts for unix and .bat-scripts
    for windows. In the scripts there could be a java call, e.g. "java someApplication",
    or some executables could be called. These scripts set the applications' environment etc.
    and start the application finally.
    My java application calls these scripts via the ProcessBuilder API, which is working fine.
    But there is the following problem: on windows, when executing a script that starts
    some other application, the ProcessBuilder gives me process-handle to the started
    process. If calling destroy() on this handle, only the cmd.exe gets killed which
    started the application. The application itself is running on. This is undesired behaviour
    since I want to be able to control the started applications, at least start and stop it which
    is impossible that way.
    On unix, it is working when using
    "exec java someApplication"
    instead of just
    "java someApplication"
    in the .sh-scripts. The exec command substitutes the shell process with the underlying
    process started in the script, so everything is working as expected on unix.
    But how could I get this working on windows systems? Is there any equivalent to the exec
    command on unix? Any suggestions appreciated.
    If something's unclear in my description, please let me know.

    Yes - after looking at this option - I think that's the direction I am going to go. It probably makes sense to give my JMS topics and my BPEL server their own OC4J instances anyway - for a number of reasons.
    Lon

  • Developing Java application for windows CE based Handheld device

    Hi everybody,
    I am planning to develop the java application for windows CE
    based handheld device.I came to know that Oracle 9iLite supports
    the Developement of Java Application for windows CE devices.Can
    i use the JDeveloper IDE to develop the application on windows
    NT.If so how to deploy the application on windows CE device(Is
    there any options in Jdeveloper to deploy the application).Any
    body please give the solution.
    Regards,
    Siva mani kumar.D

    I agree. In my opinion Sun has done a horrible job documenting all this madness for the average developer just starting out with this stuff. There is the CLDC, J2ME, Personal Java, J2ME-WTK, MIDP, MIDP-FCS ... maddness. Anyway after sorting through it all for a few days, I think the answer to your question you will need to use Personal Java for WinCE and the Sharp Zaurus, and MIDP for PalmOS for the palm. Jeode seems to be the most common and best Personal Java implementation and it is basically the JDK1.2.2 (or is it 1.1.8) that is designed to run on WinCE and Embeddix (such as Lineo on the Zaurus). You program it just like you would a 1.1.8 application and then you can test it by running pjava.exe which is included in the personal java 3.1 download from Sun. There is also a program called JavaCheck that will ensure that your app will run properly in PersonalJava. As for the Palm, MIDP for PalmOS is a 574K program that installs on your palm device. You then use the J2ME-WTK (wireless toolkit) to build a JAR/JAD file and you use the MIDP API to write the code.

  • How can i run java application at system startup just liks as services

    How we can run java application at the time of system
    starts up just like as services.

    Hi,
    At first you have to create an exe of the class file.
    for that go to the site www.duckware.com/java2exe.html
    Click on the j2exe23c.exe(75k) download it and install in ur system. convert the class file to windows exe.
    The put the exe in the startup folder in windows.
    If ur not able to find that folder search for it and put that exe in that folder.

  • How do starting/stopping of application services differ in R12 ??

    How do starting/stopping of application services differ in R12 when compared to 11i ??
    Can I start/stop services using opmnctl ??

    Can you plese refer me a document where role of OPMN and OC4J in R12 is mentioned ??? In short:-
    OPMN - Oracle Process Manager & Notification Server is component in Oracle Application Server (10g) to manage (start/stop/status) Application Server components (HTTP, OC4J)
    For more:-
    http://download.oracle.com/docs/cd/B14099_19/core.1012/b13996/intro.htm
    OC4J -- oracle container for java.
    In R12 we have 3 groups of OC4J's.
    oacore OC4J - framework based applications
    forms OC4J - forms based applications
    oafm OC4J - Fusion Middleware - for mapviewer, webservices, ascontrol.
    For more, pls read
    http://download.oracle.com/docs/cd/B10464_05/web.904/b10326/intro.htm
    thanks,
    JD

  • Could not start Sun Java Application Server

    Hi ,
    I have been using JSC for a while, now and then it reports an error " could not start sun java application server...". Does any one know why it s not able to start java application server..
    Before you say anything, I have tried
    1. use netstat to find any port conflicts.
    2. Tried to start application server manually
    3. shut down and start studio creator and then try running the project
    4. shut down and start PC
    unfortunately none of them helped
    Only reinstalling resolved the problem. But I cant keep reinstalling very often.
    Does any one know the permanent solution for this problem.
    Cheers
    kush

    Sometimes it appears this is a timeout issue because it's taking too long to come up. As Jonathan says, undeploy can help with this (along with his other suggestions).
    How many deployed projects do you see (in the server navigator you can open up the deployed server and see what's out there)?
    I periodically undeploy "junk" projects that I'm not really using because they slow down the server startup (same thing happens I believe for tomcat... when the server starts it has to load them all and it takes awhile). You can undeploy from within the server navigator by drilling into the server nav and right clicking on the deployed app and choosing undeploy... or you can use the server admin tool.
    hth,
    v

  • Developing Java Applications for Windows CE

    Hello,
    I hope this sub forum is right. So I must develop a Java Application for Windows CE. I read something about J2ME, but I think this is only for Mobilephone and Windows CE supports AWT. So I tried just some simple forms with J2ME.
    Can anybody tell me how I develop java Applications for Windows CE? Can I use Eclipse or must I use another IDE?
    Realy I developed Swing 5-6 Month but I have no idea how I develop Java Applications for Windows CE.
    Thanks a lot for helping...

    The MIDP for Palm OS 1.0 requires Palm OS v3.5 or higher to run. According to your error message, the emulator is not running v3.5 or higher. Try to get hold of a ROM image with a later version. I've run it with v4.0 of the OS and it works.

  • What is the recommended way to launch a web-start enabled Java application?

    Hello,
    I have a simple web-start enabled Java application, which I can launch from a brower by entering :
    https://xx.xx.x.xxx/MyApp/launch.html
    This method would show me a page. I then had to click on a link to run my application.
    I noticed that I could also launch my program by entering :
    https://xx.xx.x.xxx/MyApp/launch.jnlp
    This method would run my application right away.
    I wonder if there is a recommended way to launch/run a web-start enabled Java application?
    Thank you,
    Akino

    user8708553 wrote:
    ..to directly launch my application and bypass the HTML page, why is there a need to
    display the HTML page and make the user do a click?There are a number of advantages to using the web page. Including..
    <li> An explanation to the end-user of what the application does (a 'sales pitch').
    <li> Provision of screen shots of the app. (more 'sales pitch').
    <li> A description of what security environment it requires, and why.
    <li> Access to using the deployJava.js* to ensure the end-user actually has Java installed & has a suitable minimum version of Java, before they ever get access to the launch button/link.
    * http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deployingApplications

  • How to Start / Stop Oracle Applications

    How to Start / Stop Oracle Applications.
    Oracle Applications Services (TCF, ConcManagers, Metric, Forms, Reports etc...) TnsListner & Oracle Service (DB) are started when the Server is started.
    What is the sequential Order to Start / Shutdown services, Listener & DB.
    Best regards,

    hi
    there is no hard coded rule on which service should be started first.
    the basic thing is concurrent manager uses database for starting, so i advice you the following sequence:
    1. start the database
    2. start the database listener
    3. Apache server
    4. forms server
    5. report server
    6. concurrent manager
    and shutdown in the reverse order
    simple
    regards
    srinivas

Maybe you are looking for

  • Mail OS wont open, it just says "program not answering"

    I just intalled the latest update, and now when i click to open mail OS, i wont open the program, i just gives the message "Program not answerin" when i right click on the mail icon.

  • How can I move information from one icloud account to a brand new one?

    I've shared an icloud account with my sister for years and I want to get one with just my information. However, I'm not sure how to move or copy all of my information from my old icloud account into a brand new one and not lose any. Making a brand ne

  • Lost connection detection time difference

    Having a problem understanding why a broken JDBC connection is detected under Windows much quicker than it is under Linux. I have an process that opens a connection to MSSQL using JDBC, a Stored Procedure is then executed and the result set processed

  • NB100 3G Ericsson F3507g not working with Windows 7

    I've done everything and I can't make it work in Windows 7, although it works on Windows XP. I've already upgraded the modem firmware to the latest R1D06 (I had to downgrade to XP to do it, because in windows 7 the upgrade program notices "No module

  • Restoring Original Track Data

    I recently edited the details of a large number of tracks and I want to restore the original data I.e. Artists Name instead of Various Artists as I had changed it to. I thought if I deleted the tracks from ITunes and re imported them this would resto