You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/learning/howto/runner-service-windows.md
+42-1Lines changed: 42 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,6 +141,10 @@ endlocal
141
141
142
142
7. Execute the following command (you can copy and paste it directly on the CMD terminal to execute it):
143
143
144
+
:::: tabs
145
+
146
+
@tab Standard (`java` mode)
147
+
144
148
```bat
145
149
runner.exe //IS//Runner ^
146
150
--DisplayName=Runner ^
@@ -164,10 +168,47 @@ runner.exe //IS//Runner ^
164
168
--StdError=C:\runner\runner.log
165
169
```
166
170
167
-
:::tip Note
171
+
:::tip Note
168
172
The service name uses a double slash (`//IS//runner`) — this is the procrun syntax for "install service". `--Jvm=auto` lets procrun locate `jvm.dll` automatically from `JAVA_HOME` / the registry. The stop is delegated to `stop-runner.bat` through `cmd.exe`; the full path to `cmd.exe` is required because procrun passes `--StopImage` directly to `CreateProcess`, which does not search the `PATH` (a bare `cmd` fails with `The system cannot find the file specified`).
169
173
:::
170
174
175
+
@tab Alternative (more logging, `jvm` mode)
176
+
177
+
With `--StartMode=java`, procrun launches the Runner as a **separate**`java.exe` process and does not pipe that process's output into `--StdOutput`/`--StdError`, so `runner.log` can stay empty. Use this `jvm`-mode variant instead: procrun loads the JVM **in-process** and captures the Runner's `System.out`/`System.err` directly into the log file.
:::warning Set `--Jvm` to your real `jvm.dll` path
205
+
In `jvm` mode, `--Jvm=auto` often fails with `no JVM configured or found in registry` (many JDK/JRE builds don't register in the Windows registry, and the `LocalSystem` account doesn't see a user-level `JAVA_HOME`). Replace `<JAVA_INSTALL_PATH>` with your Java installation directory (the same path as `JAVA_HOME`).
206
+
207
+
Note that `jvm` mode replaces `--StartMode=java`/`--StartParams=-jar#runner.jar` with `--StartMode=jvm`, `--Classpath` (the path to `runner.jar`) and `--StartClass` (the Runner main class). The `runner.exe` (procrun) and the `jvm.dll` must be the **same architecture** (use the 64-bit `prunsrv.exe` from `amd64\` with a 64-bit JRE/JDK).
0 commit comments