Unable to run a java aplication as service or scheduled task

  • Follow


Hi all.I'm new on this group, so I don't know if I had to post this questionhere.Maybe someone could help me with this issue.I have this .jar application that connects and sincronices two Sybasedatabases. 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 rusit as a Scheduled task, but it doen't work, because I can't run theJVM.I believe that I don't have to tell you that I've no F***ing ideaabout programing on JAVA language.please help,best regards.
0
Reply Lucho 1/18/2008 6:00:14 PM

On 01/18/2008 at 13:00:14, Lucho <luisadrian.garcia@gmail.com> 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. 
0
Reply derek 1/18/2008 6:27:20 PM


derek <derek> wrote:> On 01/18/2008 at 13:00:14, Lucho <luisadrian.garcia@gmail.com> 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 youcan 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...
0
Reply Andreas 1/18/2008 6:35:47 PM

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 getsoftware that can wrap a Java app in a Windows service EXE, butit will be more complex than just using the scheduler.Arne
0
Reply ISO 1/19/2008 1:21:56 AM

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 JITcompiling this byte code, because this app is a serverapp that will run for days, so investing some startup timefor better optimization will pay off well".Arne
0
Reply ISO 1/19/2008 1:24:35 AM

Arne Vajh�j <arne@vajhoej.dk> 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.
0
Reply Andreas 1/19/2008 9:57:31 AM

5 Replies
372 Views

(page loaded in 0.149 seconds)

Similiar Articles:













7/23/2012 9:48:27 AM


Reply: