Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » RCP as Windows Service
RCP as Windows Service [message #260799] Fri, 11 July 2008 16:45 Go to next message
Gary is currently offline GaryFriend
Messages: 6
Registered: July 2009
Junior Member
I am attempting to figure out how to start my RCP application as a
Windows Service.. there doesnt seem to be much in the way of content on
the web describing how this may be achieved.. but surely it must be
possible..

I've been attempting to use Java Service Wrapper.. unsuccessfully as of
yet..

Does anyone have any tips/recommendations/resources ??

Gary
Re: RCP as Windows Service [message #260804 is a reply to message #260799] Fri, 11 July 2008 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gxquarel.txin.it

You have to download Windows Resource kit tools and use srvany.exe to wrap
eclipse.exe as a service.

Ciao

Giovanni

"Gary Louttit" <gary.louttit@gmail.com> ha scritto nel messaggio
news:g582mk$dp0$1@build.eclipse.org...
>I am attempting to figure out how to start my RCP application as a Windows
>Service.. there doesnt seem to be much in the way of content on the web
>describing how this may be achieved.. but surely it must be possible..
>
> I've been attempting to use Java Service Wrapper.. unsuccessfully as of
> yet..
>
> Does anyone have any tips/recommendations/resources ??
>
> Gary
Re: RCP as Windows Service [message #260807 is a reply to message #260799] Fri, 11 July 2008 18:04 Go to previous messageGo to next message
Topher Fangio is currently offline Topher FangioFriend
Messages: 4
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------020202080304070706090003
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

I just successfully set this up about a week ago. We are using
Wrapper.app with a specialized configuration file. After exporting the
product through eclipse, I have a batch file that moves the plugins
around a bit to get them in the correct directories. It also deletes the
..eclipseproduct and eclipse.exe files since I launch the necessary
plugins manually in the config.ini.

My directory structure looks like the following:

- OurService
- bin
OurService.bat
InstallOurService-NT.bat
UninstallOurService-NT.bat
wrapper.exe
- conf
wrapper.conf
- configuration
config.ini
- lib
wrapper.jar
wrapper.dll
- logs
- plugins
*all of our plugins*
net.fractech.ops.daq.core_1.0.0.jar
net.fractech.ops.daq_1.0.0.jar
org.eclipse.equinox.common_3.4.0.v20070910
org.eclipse.osgi_3.3.0.v20070530
org.eclipse.update.configurator_3.2.100.v20070615
org.springframework.osgi.spring-osgi-extender_1.0.0.m2

Attached are the config.ini and wrapper.conf configuration files. All of
the other files I believe are standard except for a few changes of
names. Note that we are using 3.3 at the moment, so things may be
slightly different for 3.4.

Let me know if you have any questions!

TF

Gary Louttit wrote:
> I am attempting to figure out how to start my RCP application as a
> Windows Service.. there doesnt seem to be much in the way of content on
> the web describing how this may be achieved.. but surely it must be
> possible..
>
> I've been attempting to use Java Service Wrapper.. unsuccessfully as of
> yet..
>
> Does anyone have any tips/recommendations/resources ??
>
> Gary


--------------020202080304070706090003
Content-Type: text/plain;
name="config.ini"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="config.ini"

#Product Runtime Configuration File
osgi.bundles=org.eclipse.equinox.common@2:start, \
org.eclipse.update.configurator@3:start, \
org.springframework.osgi.spring-osgi-extender@2:start, \
net.fractech.ops.daq_1.0.0.jar@start, \
net.fractech.ops.daq.core_1.0.0.jar@start

eclipse.ignoreApp=true
osgi.noShutdown=true

osgi.bundles.defaultStartLevel=4

--------------020202080304070706090003
Content-Type: text/plain;
name="wrapper.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="wrapper.conf"

#*********************************************************** *********
# Wrapper Properties
#*********************************************************** *********
# Java Application
wrapper.java.command=java

# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSim pleApp

# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../org.eclipse.osgi_3.3.0.v20070530 .jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib

# Java Additional Parameters
wrapper.java.additional.1=

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64

# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.eclipse.core.runtime.adaptor.Ecl ipseStarter

#*********************************************************** *********
# Wrapper Logging Properties
#*********************************************************** *********
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM

# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=../logs/wrapper.log

# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE

#*********************************************************** *********
# Wrapper Windows Properties
#*********************************************************** *********
# Title to use when running as a console
wrapper.console.title=@app.long.name@

#*********************************************************** *********
# Wrapper Windows NT/2000/XP Service Properties
#*********************************************************** *********
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=OurService

# Display name of the service
wrapper.ntservice.displayname=Our Cool Service

# Description of the service
wrapper.ntservice.description=Our Cool Service Description

# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false


--------------020202080304070706090003--
Re: RCP as Windows Service [message #260824 is a reply to message #260807] Fri, 11 July 2008 20:24 Go to previous messageGo to next message
Gary is currently offline GaryFriend
Messages: 6
Registered: July 2009
Junior Member
Thanks very much for your reply. I was able to use your advice and
start my RCP as a service. Only a couple differences.. note i am using
eclipse 3.4..

1) wrapper.conf
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../plugins/org.eclipse.equinox.laun cher_1.0.100.v20080509-1800.jar

2) wrapper.conf
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.eclipse.equinox.launcher.Main

3) I used the config.ini that was generated from my product export.

Another question however, part of my experiment was to see how my
eclipse RCP with UI + Tray icon would be handled if started as a
service. When i launch from MyApp.bat the UI/tray icon are launched but
if i start/stop from the Windows Service Manager, no user interface
appears.

Do you or your application have any experience with services w/UIs or is
a backend without UI required?

Gary

Topher Fangio wrote:
> Hello,
>
> I just successfully set this up about a week ago. We are using
> Wrapper.app with a specialized configuration file. After exporting the
> product through eclipse, I have a batch file that moves the plugins
> around a bit to get them in the correct directories. It also deletes the
> .eclipseproduct and eclipse.exe files since I launch the necessary
> plugins manually in the config.ini.
>
> My directory structure looks like the following:
>
> - OurService
> - bin
> OurService.bat
> InstallOurService-NT.bat
> UninstallOurService-NT.bat
> wrapper.exe
> - conf
> wrapper.conf
> - configuration
> config.ini
> - lib
> wrapper.jar
> wrapper.dll
> - logs
> - plugins
> *all of our plugins*
> net.fractech.ops.daq.core_1.0.0.jar
> net.fractech.ops.daq_1.0.0.jar
> org.eclipse.equinox.common_3.4.0.v20070910
> org.eclipse.osgi_3.3.0.v20070530
> org.eclipse.update.configurator_3.2.100.v20070615
> org.springframework.osgi.spring-osgi-extender_1.0.0.m2
>
> Attached are the config.ini and wrapper.conf configuration files. All of
> the other files I believe are standard except for a few changes of
> names. Note that we are using 3.3 at the moment, so things may be
> slightly different for 3.4.
>
> Let me know if you have any questions!
>
> TF
>
> Gary Louttit wrote:
>> I am attempting to figure out how to start my RCP application as a
>> Windows Service.. there doesnt seem to be much in the way of content
>> on the web describing how this may be achieved.. but surely it must
>> be possible..
>>
>> I've been attempting to use Java Service Wrapper.. unsuccessfully as
>> of yet..
>>
>> Does anyone have any tips/recommendations/resources ??
>>
>> Gary
>
Re: RCP as Windows Service [message #260836 is a reply to message #260824] Fri, 11 July 2008 22:36 Go to previous messageGo to next message
Gary is currently offline GaryFriend
Messages: 6
Registered: July 2009
Junior Member
Hrmm, the Main i am referencing comtains comments as to suggest using
EclipseStarter.. as you are doing..

wrapper.java.classpath.2=../plugins/org.eclipse.osgi_3.4.0.v 20080605-1900.jar
wrapper.app.parameter.1=org.eclipse.core.runtime.adaptor.Ecl ipseStarter

but when i do i cannot launch from any bat files..

Gary



Gary Louttit wrote:
> Thanks very much for your reply. I was able to use your advice and
> start my RCP as a service. Only a couple differences.. note i am using
> eclipse 3.4..
>
> 1) wrapper.conf
> # Java Classpath (include wrapper.jar) Add class path elements as
> # needed starting from 1
> wrapper.java.classpath.1=../lib/wrapper.jar
> wrapper.java.classpath.2=../plugins/org.eclipse.equinox.laun cher_1.0.100.v20080509-1800.jar
>
>
> 2) wrapper.conf
> # Application parameters. Add parameters as needed starting from 1
> wrapper.app.parameter.1=org.eclipse.equinox.launcher.Main
>
> 3) I used the config.ini that was generated from my product export.
>
> Another question however, part of my experiment was to see how my
> eclipse RCP with UI + Tray icon would be handled if started as a
> service. When i launch from MyApp.bat the UI/tray icon are launched but
> if i start/stop from the Windows Service Manager, no user interface
> appears.
>
> Do you or your application have any experience with services w/UIs or is
> a backend without UI required?
>
> Gary
>
> Topher Fangio wrote:
>> Hello,
>>
>> I just successfully set this up about a week ago. We are using
>> Wrapper.app with a specialized configuration file. After exporting the
>> product through eclipse, I have a batch file that moves the plugins
>> around a bit to get them in the correct directories. It also deletes
>> the .eclipseproduct and eclipse.exe files since I launch the necessary
>> plugins manually in the config.ini.
>>
>> My directory structure looks like the following:
>>
>> - OurService
>> - bin
>> OurService.bat
>> InstallOurService-NT.bat
>> UninstallOurService-NT.bat
>> wrapper.exe
>> - conf
>> wrapper.conf
>> - configuration
>> config.ini
>> - lib
>> wrapper.jar
>> wrapper.dll
>> - logs
>> - plugins
>> *all of our plugins*
>> net.fractech.ops.daq.core_1.0.0.jar
>> net.fractech.ops.daq_1.0.0.jar
>> org.eclipse.equinox.common_3.4.0.v20070910
>> org.eclipse.osgi_3.3.0.v20070530
>> org.eclipse.update.configurator_3.2.100.v20070615
>> org.springframework.osgi.spring-osgi-extender_1.0.0.m2
>>
>> Attached are the config.ini and wrapper.conf configuration files. All
>> of the other files I believe are standard except for a few changes of
>> names. Note that we are using 3.3 at the moment, so things may be
>> slightly different for 3.4.
>>
>> Let me know if you have any questions!
>>
>> TF
>>
>> Gary Louttit wrote:
>>> I am attempting to figure out how to start my RCP application as a
>>> Windows Service.. there doesnt seem to be much in the way of content
>>> on the web describing how this may be achieved.. but surely it must
>>> be possible..
>>>
>>> I've been attempting to use Java Service Wrapper.. unsuccessfully as
>>> of yet..
>>>
>>> Does anyone have any tips/recommendations/resources ??
>>>
>>> Gary
>>
Re: RCP as Windows Service [message #261062 is a reply to message #260824] Mon, 14 July 2008 16:24 Go to previous message
Topher Fangio is currently offline Topher FangioFriend
Messages: 4
Registered: July 2009
Junior Member
At the moment, our service is a separate backend that has no user
interface, so I am not quite sure how to go about adding a tray icon.

After looking through the documentation a little bit, it looks like you
might be able to get it to work by adding
wrapper.ntservice.interactive=true to the wrapper.conf file. Take a look
at the following url:
http://wrapper.tanukisoftware.org/doc/english/prop-ntservice -interactive.html

Hope this helps.

TF

Gary Louttit wrote:
> Thanks very much for your reply. I was able to use your advice and
> start my RCP as a service. Only a couple differences.. note i am using
> eclipse 3.4..
>
> 1) wrapper.conf
> # Java Classpath (include wrapper.jar) Add class path elements as
> # needed starting from 1
> wrapper.java.classpath.1=../lib/wrapper.jar
> wrapper.java.classpath.2=../plugins/org.eclipse.equinox.laun cher_1.0.100.v20080509-1800.jar
>
>
> 2) wrapper.conf
> # Application parameters. Add parameters as needed starting from 1
> wrapper.app.parameter.1=org.eclipse.equinox.launcher.Main
>
> 3) I used the config.ini that was generated from my product export.
>
> Another question however, part of my experiment was to see how my
> eclipse RCP with UI + Tray icon would be handled if started as a
> service. When i launch from MyApp.bat the UI/tray icon are launched but
> if i start/stop from the Windows Service Manager, no user interface
> appears.
>
> Do you or your application have any experience with services w/UIs or is
> a backend without UI required?
>
> Gary
>
> Topher Fangio wrote:
>> Hello,
>>
>> I just successfully set this up about a week ago. We are using
>> Wrapper.app with a specialized configuration file. After exporting the
>> product through eclipse, I have a batch file that moves the plugins
>> around a bit to get them in the correct directories. It also deletes
>> the .eclipseproduct and eclipse.exe files since I launch the necessary
>> plugins manually in the config.ini.
>>
>> My directory structure looks like the following:
>>
>> - OurService
>> - bin
>> OurService.bat
>> InstallOurService-NT.bat
>> UninstallOurService-NT.bat
>> wrapper.exe
>> - conf
>> wrapper.conf
>> - configuration
>> config.ini
>> - lib
>> wrapper.jar
>> wrapper.dll
>> - logs
>> - plugins
>> *all of our plugins*
>> net.fractech.ops.daq.core_1.0.0.jar
>> net.fractech.ops.daq_1.0.0.jar
>> org.eclipse.equinox.common_3.4.0.v20070910
>> org.eclipse.osgi_3.3.0.v20070530
>> org.eclipse.update.configurator_3.2.100.v20070615
>> org.springframework.osgi.spring-osgi-extender_1.0.0.m2
>>
>> Attached are the config.ini and wrapper.conf configuration files. All
>> of the other files I believe are standard except for a few changes of
>> names. Note that we are using 3.3 at the moment, so things may be
>> slightly different for 3.4.
>>
>> Let me know if you have any questions!
>>
>> TF
>>
>> Gary Louttit wrote:
>>> I am attempting to figure out how to start my RCP application as a
>>> Windows Service.. there doesnt seem to be much in the way of content
>>> on the web describing how this may be achieved.. but surely it must
>>> be possible..
>>>
>>> I've been attempting to use Java Service Wrapper.. unsuccessfully as
>>> of yet..
>>>
>>> Does anyone have any tips/recommendations/resources ??
>>>
>>> Gary
>>
Previous Topic:Creating a new editor page on a button click
Next Topic:Unable to update eclipse plugin
Goto Forum:
  


Current Time: Sun Jun 16 19:30:48 GMT 2024

Powered by FUDForum. Page generated in 0.08073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top