Unable to run a java aplication as service or scheduled task

L

Lucho

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

derek

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

Andreas Leitgeb

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

Arne Vajhøj

Lucho said:
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
 
A

Arne Vajhøj

Andreas said:
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
 
A

Andreas Leitgeb

Arne Vajhøj said:
Andreas said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top