Unable to run a java aplication as service or scheduled task

Discussion in 'Java' started by Lucho, Jan 18, 2008.

  1. Lucho

    Lucho Guest

    Hi all.
    I'm new on this group, so I don't know if I had to post this question
    here.
    Maybe someone could help me with this issue.
    I have this .jar application that connects and sincronices two Sybase
    databases. It runs fine, but I have to be logged on the server
    (Windows 2K3 SP1) to be able to run the aplication. I had tried to rus
    it as a Scheduled task, but it doen't work, because I can't run the
    JVM.
    I believe that I don't have to tell you that I've no F***ing idea
    about programing on JAVA language.
    please help,

    best regards.
     
    Lucho, Jan 18, 2008
    #1
    1. Advertising

  2. Lucho

    derek Guest

    On 01/18/2008 at 13:00:14, Lucho <> wrote:

    > I have this .jar application that connects and sincronices two Sybase
    > databases. It runs fine, but I have to be logged on the server
    > (Windows 2K3 SP1) to be able to run the aplication. I had tried to rus
    > it as a Scheduled task, but it doen't work, because I can't run the
    > JVM.


    The easiest i have found to do this is just create a .bat file that calls the java program you want to run.
    Then go into scheduled tasks and create a task that calls the .bat program.


    ..
    =====================================================
    THIS IS MY SIGNATURE. There are many like it, but this one is mine.
     
    derek, Jan 18, 2008
    #2
    1. Advertising

  3. derek <derek> wrote:
    > On 01/18/2008 at 13:00:14, Lucho <> wrote:
    >
    >> I have this .jar application that connects and sincronices two Sybase
    >> databases. It runs fine, but I have to be logged on the server
    >> (Windows 2K3 SP1) to be able to run the aplication. I had tried to rus
    >> it as a Scheduled task, but it doen't work, because I can't run the
    >> JVM.


    Just speculating, if the application doesn't need a GUI (which I assume,
    since you obviously want to start it without being logged in), then you
    can try adding option "-server" to the java-command-line.

    > The easiest i have found to do this is just create a .bat file that calls
    > the java program you want to run. Then go into scheduled tasks and create
    > a task that calls the .bat program.


    Perhaps you need a combination of both, specifying the "-server"-option
    inside the .bat file...
     
    Andreas Leitgeb, Jan 18, 2008
    #3
  4. Lucho

    Arne Vajhøj Guest

    Lucho wrote:
    > I'm new on this group, so I don't know if I had to post this question
    > here.
    > Maybe someone could help me with this issue.
    > I have this .jar application that connects and sincronices two Sybase
    > databases. It runs fine, but I have to be logged on the server
    > (Windows 2K3 SP1) to be able to run the aplication. I had tried to rus
    > it as a Scheduled task, but it doen't work, because I can't run the
    > JVM.


    It should be possible to get that to work.

    And I would say that it is the easiest solution. You can get
    software that can wrap a Java app in a Windows service EXE, but
    it will be more complex than just using the scheduler.

    Arne
     
    Arne Vajhøj, Jan 19, 2008
    #4
  5. Lucho

    Arne Vajhøj Guest

    Andreas Leitgeb wrote:
    > Just speculating, if the application doesn't need a GUI (which I assume,
    > since you obviously want to start it without being logged in), then you
    > can try adding option "-server" to the java-command-line.


    ????

    A GUI works fine with -server.

    The name -server may be slightly misleading.

    It just means "just spend all the time you want JIT
    compiling this byte code, because this app is a server
    app that will run for days, so investing some startup time
    for better optimization will pay off well".

    Arne
     
    Arne Vajhøj, Jan 19, 2008
    #5
  6. Arne Vajhøj <> wrote:
    > Andreas Leitgeb wrote:
    >> Just speculating, if the application doesn't need a GUI (which I assume,
    >> since you obviously want to start it without being logged in), then you
    >> can try adding option "-server" to the java-command-line.

    > ????
    > A GUI works fine with -server.
    > The name -server may be slightly misleading.
    > [ explanation that -server only effects the choice of
    > optimization strategies in the jvm, nothing else]


    oops. Seems like I learnt that wrong some years ago...

    Thanks for clarifying.
     
    Andreas Leitgeb, Jan 19, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Walsh

    Scheduled Task in J2EE

    Ian Walsh, Sep 11, 2004, in forum: Java
    Replies:
    3
    Views:
    3,736
    Wei Jiang
    Sep 13, 2004
  2. knocker

    J2ME Scheduled task?

    knocker, Sep 20, 2004, in forum: Java
    Replies:
    2
    Views:
    655
    Darryl L. Pierce
    Sep 23, 2004
  3. SLEEPY LOLO

    Scheduled task

    SLEEPY LOLO, Feb 3, 2005, in forum: C++
    Replies:
    7
    Views:
    723
    Victor Bazarov
    Feb 4, 2005
  4. upin_cool
    Replies:
    0
    Views:
    4,728
    upin_cool
    May 15, 2006
  5. Alessandro
    Replies:
    1
    Views:
    1,842
    Arne Vajhøj
    Feb 5, 2009
Loading...

Share This Page