aspose file tools*
The moose likes Java in General and the fly likes Need Information for Java as Windows Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need Information for Java as Windows Service" Watch "Need Information for Java as Windows Service" New topic
Author

Need Information for Java as Windows Service

John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Hi,

I need to run a Java application (an Eclipse project with a main class that depends on other 2 projects + a big list of 3rd party jars) as a Windows Service.

Upon reading many reviews and even one from CodeRaunch (http://www.coderanch.com/t/382092/java/java/running-java-class-as-windows) I believe Java Service Wrapper is the best one of all. But I need only a Free Software so please answer my questions below.

1. Is Community version of Java Service Wrapper be able to suffice my requirement - will it be free forever on which i can build my java app as service so that it runs uninterrupted for licenses for next 2-3 years?

2. Is Apache-Commons Daemons (precisely Procrun) a better tool over Java Service Wrapper for creating services?

What do you prefer -> Java Service Wrapper (Community Version) or the Apache Commons Daemons.... If you have any other good OPEN SOURCE alternatives do please suggest.

Thanks much!
John
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19762
    
  20

John Jai wrote:1. Is Community version of Java Service Wrapper be able to suffice my requirement - will it be free forever on which i can build my java app as service so that it runs uninterrupted for licenses for next 2-3 years?

That's the nice thing about licenses - once a version of a product is released with a specific license, that license remains valid forever for that specific version of the product. Sure, future versions may be released under different licenses, but you will still be able to continue working with the current version under the current license.

This is exactly what happened to XFree86. They announced a license change, many people didn't like that so they used the last version with the old license to fork that and creeate xorg.

Note that with services (like iTunes) this does not hold. The latest license applies to the service. When the license changes you have to either agree to it, or disagree and not be able to use the service anymore.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Thanks Rob.

And please anyone can help me choose between Java Service Wrapper & Common Daemons of Apache?

Thanks

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19762
    
  20

I've only used the Java Service Wrapper so I can't comment on any others.
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Hi Rob,

I am seriously struck here. Java Service Wrapper does not have community release for 64 bit Windows.

Could you please suggest any wrappers that provide wrapper service for a 64-bit.

Meanwhile I tried developing with the 32-bit Java Service Wrapper for a local 32-bit desktop & it worked great. It was easy too!

Thanks much!
John
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18909
    
    8

Did you find that your 32-bit wrapper actually failed to work on your 64-bit machine? Because 64-bit machines are designed so that you can run most 32-bit software on them.
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
I was reported that it's not working. Found the below error in the log files I received.

==============

C:\eclipseworkspace\JMS-Service\lib\wrapper.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

System signals will not be handled correctly.

==============

I will check YetAnother Java Service Wrapper (YAJSW) and tell my experience
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Hi,

I forgot to update this post. First I tried with the Java Service Wrapper which worked fine for 32 bit processor but did not have free license for 64 bit. Then I migrated from JSW to Yet Another Java Service Wrapper (migration was very easy, just property file changes). They have free 64 bit free licenses.

Thanks much!
John
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need Information for Java as Windows Service