3
;This section defines variables, which can be used elsewhere in the ini file
4
;A variable referencing itself e.g. "PATH=%PATH%;c:\java\test" will result in an import from the environment.
5
;JSL will first look in the normal environment then in the system environment of the registry as a fallback.
6
;Any variable not in the defines section will result in a environment lookup as well.
7
;Variable substitution is possible in any value in the ini file
11
;P1 = d:\java\test\jsl_0_9_9p
14
;Comma seperated list of variables to be exported to the environment
15
;Supersedes the "path" parameter further down.
16
;Do not use the path parameter if you also set "PATH"in the export parameter as precedence is undefined.
17
;export = CLASSPATH,PATH
21
servicename = TelnetEcho
22
displayname = TelnetEcho
23
servicedescription = Description for Telnet Echo
26
;Size of internal buffer for string handling
27
;increase if you use very long command line parameters e.g. a very long classpath
30
;OBSOLETE but supported
31
;port used to communicate stop command to JVM
32
;Must be unique for each JSL instance installed
33
;This option is ignored if a stop method is defined further down
36
;delay n milliseconds to start the Java VM
37
;Default is no start delay
40
;service dependencies can be added
41
;as a comma separated string "dep1,dep2"
49
;Allow interaction with desktop
50
;This is a service configuration flag; default is false
51
;interactwithdesktop = false
54
loadordergroup=someorder
56
;account under which service runs
58
account=NT AUTHORITY\NetworkService
60
;password for above account
61
;system need not provide a password
62
;obfuscation of password is not supported. It is actually not needed.
63
;The password specified here is ONLY used during the jsl -install command. It can (and should) be deleted after installation.
66
;Allocate a console and register a console event handler to catch shutdown events.
67
;Default is true; options are FALSE TRUE false true YES NO yes no
68
;This option has two effects:
69
;1. If active it catches the logoff events and prevents the service from erroneously stopping in this case.
70
;2. It creates a console window if interaction with the desktop is allowd.
71
;Effect 1 can be achieved in Java 1.3.1 and higher by using the -Xrs option.
72
;Effect 2 may or may not be desired.
73
useconsolehandler=false
75
;Call <stopclass>.<stopmethod> through JNI so stop the JVM.
76
;This can be used an alternative to the ServiceStopper
77
;When all three parameters are defined the JSL will try to use JNI to stop the service.
78
;If not it will use a tcp/ip connection to the stopport.
79
;The simplest way to use this functionality is to use the Systen.exit() call as specified below.
80
;Nevertheless you can call any static method in your code.
81
;The method called is expected to terminate the JVM one way or the other. It can directly
82
;call System.exit() or make another Thread do it make the main method return.
83
;The method can return imediately if desired. If the JVM doesn't stop another attempt can be made to
84
;stop the service at a later time.
85
stopclass=java/lang/System
88
;Take care to specify the right signature for your method. void System.exit( int code ) has
89
;the sifnature specified below. void myMethod() has the signature ()V. Please refer to the
90
;JNI documentation for details.
93
;Parameters can be passed in "stopparam".
94
;Note that parameter passing is only implemented for the special case that the signature of the
95
;method is (String[]). Generic parameter passing is cumbersome to implement in C so I choose
96
;to implement only the most common case.
97
;stopsignature=([Ljava/lang/String;)V
98
;The parameter list is parsed into an array. Delimiters are spaces or quoted strings.
99
;stopparams=STOP "OR NOT STOP"
101
;Name and signature of service pause method. Will be called on a SERVICE_CTRL_PAUSE event.
102
;Please note that unless you have configured all pause and continue arguments
103
;you will not see the pause button enabled in the service control manager GUI
104
;pauseclass=com.roeschter.jsl.TelnetEcho
109
;Name and signature of service continue method. Will be called on a SERVICE_CTRL_CONTINUE event.
110
;Please note that unless you have configured all pause and continue arguments
111
;you will not see the pause button enabled in the service control manager GUI
112
;contclass=com.roeschter.jsl.TelnetEcho
117
;Value of the PATH environement variable being set by the service.
118
;PATH will remain unchanged if this is empty.
121
;Redirect C level stdout and stderr to the specified files
122
;Please note that those are different files than the ones used below for
123
;Java level stdout and stderr
124
;Default is no redirection
125
;Use the pattern below to timestamp/rotate log files. Please note the %% escapes
126
;Applies to stdout and the debug logfile. If not present there will be no log file rotation.
127
logtimestamp = "%%Y-%%m-%%d"
128
;stdout=c:\temp\stdout.log
130
;stderr=c:\temp\stderr.log
132
;redirect log to file for errors and debugging - you will only see output here if debugging is enabled
133
;Use debug version or set _JAVA_LAUNCHER_DEBUG environment variable
134
logfile = C:\temp\jslmy.log
136
;Forces debugging mode
140
;Redirect JAVA level System.out and System.err to the specified files
141
;This simply sets new output streams for System.out and System.err after
142
;the JVM is initialized but before the main method is called.
143
;You might find that this option has no effect at all for some applications, as the
144
;JAVA application is of course free to redirect System.out and System.err
145
;to some other log mechanism.
146
;Default is no redirection
147
;Default is to overwrite file
148
;systemout=c:\systemout.log
150
;systemerr=c:\systemerr.log
153
;Explicitely call this method and wait for it to return before setting the service to status running
154
;This method will be called before the main method
155
;After we call this method the service will only be set to SERVICE_RUNNING once it returns
156
;This is started in a seperate thread and will not prevent the main method from being called
157
;Uncomment the confirmrunclass to enable
158
;confirmrunclass=com.roeschter.jsl.TelnetEcho
159
confirmrunmethod=confirmRunning
160
confirmrunsignature=()V
163
;This method will be called before the main method of the start class specified on command line
164
;but after the JVM is fully initialized and stdout and stderr redirection have been performed.
165
;This method must return! It is called from the same thread as the main method.
166
;In order for the normal JVM start behaviour to continue this method must return 0.
167
;It may legally return any other value or throw any exception, which in both cases will result in
168
;a regular termination of the JVM much in the same way as if an uncatched exception had been thrown
170
;It may legally start other threads in the JVM, which will behave in the same way as started from
172
;In fact you will be able to produce pretty much the same behaviour as calling the static method first in
174
;The example method present here is a scheduler which will in turn run the code specified
175
;in its modules list. Some utilities are provided.
177
;Uncomment the premainclass to enable
178
;premainclass=com/roeschter/jsl/PreMainScheduler
181
premain.modules=threaddump
183
premain.threaddump.class=com.roeschter.jsl.ThreadDumpListener
184
premain.threaddump.method=start
185
premain.threaddump.wait=3000
186
premain.threaddump.critical=no
187
premain.threaddump.interface=127.0.0.1
189
;Report service stopped on exit of main thread
190
;you might want to set this to yes if your service terminates "silently"
191
;It is recommended that a service is stopped by calling System.exit() at some time,
192
;either externally or internally. This provides a nice and clean shutdown hook.
193
;If the service terminates silently by just ending the last thread this might result
194
;in the service manager not recognizing the fact and denying restart. Use yes in this case.
195
;It should usually be safe to use reportservicestoppedonmainthreadexit=true
196
;even if you use other threads then main. The shutdown code will wait for non daemon threads to stop
197
;I can't remember why I made this parameter optional. It must have been useful for some people or in some situations
199
;reportservicestoppedonmainthreadexit = no
201
;Behaviour in case of JVM exiting with an error
202
;Define whether an execption in the main method should be considered an error
203
;Use this exit code in case of an exception.
206
;Desired behaviour for a non zero exit code (including exceptions as specified above)
208
;ignore terminate without error (default)
209
;returncode exit with error code reported by the JVM to to the service manager
210
;fatal don't report regular service stop to service manager making it believe
211
;a fatal error had occured in the service (this is sometimes desirable if fatal error
212
;recovery mechanisms are in place)
215
;Use this executable for registering the service.
216
;Default is the executable used for installation
217
;modulepath="e:\java\test\jsl_0_9_9e\release\jsl.exe"
220
;Configures the the Windows service failure actions.
221
;The below is not JSL functionality, but rather Windows Server functionality, which can be overridden by the server administrator.
222
;You need to configure exceptionerrorcode and onexiterror as of above to create the expected behavior
223
;Configuration will be made at install time (jsl -install).
224
;For changes to become effective you need to reconfigure JSL (jsl -configure)
225
;See MSDN for details: https://msdn.microsoft.com/de-de/library/windows/desktop/ms681988%28v=vs.85%29.aspx
227
;The service control manager counts the number of times each service has failed since the system booted.
228
;The count is reset to 0 if the service has not failed for ResetPeriod seconds.
229
;When the service fails for the Nth time, the service controller performs the action specified in element [N-1] of the actions array.
230
;If N is greater than cActions, the service controller repeats the last action in the array.
232
;The time after which to reset the failure count to zero if there are no failures, in seconds.
233
;Specify INFINITE to indicate that this value should never be reset.
234
failureactions_resetperiod=300000
235
;The message to be broadcast to server users before rebooting in response to the SC_ACTION_REBOOT service controller action.
236
;failureactions_rebootmsg="Server going down due to Java service failure"
237
;The command line of the process for the CreateProcess function to execute in response to the SC_ACTION_RUN_COMMAND service controller action.
238
;This process runs under the same account as the service.
239
;failureactions_command="HelloWorld -seriously"
240
;The number of elements in the lpsaActions array.
241
;Settings 0 deactivates. Not configuring enough action<n>_type and action<n>_delay wil result in JSL issueing an error.
242
failureactions_actions=4
244
;SC_ACTION_NONE 0 = No action.
245
;SC_ACTION_RESTART 1 = Restart the service.
246
;SC_ACTION_REBOOT 2 = Reboot the computer.
247
;SC_ACTION_RUN_COMMAND 3 = Run a command.
249
;The time to wait before performing the specified action, in milliseconds.
252
;Setting failureactions_actions=4 will result in the following behavior:
253
;Service restart will be tried 3 times with 10s delay each. On the 4th failure the service will stop working.
263
;Path to the java runtime used
264
;The path may be relative to the working directory. E.g. .\jdk8
267
;Type of jvm to be used. Alternative mechanism to specifiying -client or -server on the command line.
268
;Can use any JVM name, which is diffrent from the command line which will only allow -client and -server
269
;Useful when using a JVM diffrent from Suns implementation.
270
;Jvmtype can be a comma seperated list. JSL will first find a JVM installation location. THEN it will load the first
271
;type of jvm in the list it can find. It will NOT search in alternative JVM locations for alternative jvm types.
272
;Be careful what JVM is actuallay installed and used before you report a bug on this feature.
273
;Default is "server,client,hotspot,classic"
274
;jvmtype=server,client,hotspot,classic
277
;Locations to search for the JRE
279
;Default is search everywhere : path,local,registry
280
;path=Use the location specified in the jrepath option above
281
;local=search for a jvm co-located with JSL (in a subdirectory \bin or \jre\bin)
282
;registry=Find a JVM in the registry
285
;Searching for various types of JVM in the registry
292
;Search in nonstandard registry path used by AZUL
295
;Search in nonstandard registry path used by AdoptOpenJDK
296
;registryfindadoptopenjdk=yes
299
;registryfindcorretto=yes
301
;Search the default registry path used by SUN/Oracle and other well behaved installers
302
;registryfindoracle=yes
307
;Comma seperated list - substring matches - e.g. 9.0 matches 9.0.1.1
308
;Java 2 to Java 8 version string are "1.2.x" ... "1.8.x"
309
;Since Java 9 the version string is "9.0.x.y"
310
;Azul Zulu uses version strings like "8.x.y.z" in the registry - you may need to specify "8,1.8" to allow both registry and version string match to pass
315
;If the working directory path starts with a "." it will be substituted with the directory where the .ini file is located
316
;This is neccessary because a service does not inherit a working directory from the shell.
317
;All other paths will resolve a "." against the working dir once it is set.
318
;wrkdir=c:\java\test\jsl_0_9_9r\release
319
wrkdir=%GEOSERVER_HOME%
321
;The java command line
322
;The entry method below using a parameter list still works but the command line variant is more convenient.
323
;Everything separated by whitespace on a java command line is broken down into a parameter here.
324
;You don't need to care about quotes
325
;around strings containing spaces here. e.g.
326
cmdline = -cp "..\src" com.roeschter.jsl.TelnetEcho
329
;OBSOLETE but supported alternative for passing parameters.
330
;May be useful if you are generating this file programatically.
331
;the number of paramters passed to the java application
332
;parameters must be named param00, param01 ...
333
;Please note that each command line parameter has to go on it's own parameter value here!
334
;The JVM expects a preparsed array of parameters.
338
;param01 = D:\java\test\jsl_0_9_9r\src
339
;param02 = com.roeschter.jsl.TelnetEcho
343
;param01 = c:\java\test\jsl_0_9_9g\src
344
;param02 = -Dcom.sun.management.jmxremote
345
;param03 = -Dcom.sun.management.jmxremote.port=9696
346
;param04 = -Dcom.sun.management.jmxremote.authenticate=false
347
;param05 = -Dcom.sun.management.jmxremote.ssl=false
348
;param06 = com.roeschter.jsl.TelnetEcho