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
### Update `JAVA_OPTS` for windows in `setenv.bat` File
42
+
### Update `JAVA_OPTS` for Windows in `setenv.bat` File
43
43
44
44
1. Navigate to the `bin` directory of your Apache Karaf installation.
45
45
2. Open the `setenv.bat` file for editing.
46
46
3. Add the paths of the downloaded agents under the `JAVA_OPTS` section. For example:
47
47
48
-
```bash
49
-
set JAVA_OPTS=-javaagent:/path/to/KeployAgent.jar
50
-
set JAVA_OPTS=%JAVA_OPTS% -javaagent:/path/to/org.jacoco.agent-0.8.12-runtime.jar=address=*,port=36320,destfile=jacoco-it.exec,output=tcpserver
48
+
```bat
49
+
set JAVA_OPTS=-javaagent:/path/to/KeployAgent.jar
50
+
set JAVA_OPTS=%JAVA_OPTS% -javaagent:/path/to/org.jacoco.agent-0.8.12-runtime.jar=address=*,port=36320,destfile=jacoco-it.exec,output=tcpserver
51
51
```
52
52
53
-
**Note**: Windows support is not thoroughly tested. It is recommended to use macOS or Linux for better stability and compatibility.
53
+
### Set Environment Variables as Java System Properties on Windows
54
+
55
+
On Windows, all environment variables should be passed as `-D` system properties for Java. Update the `JAVA_OPTS` section in `setenv.bat` to include the required variables. For example:
56
+
57
+
```bat
58
+
set JAVA_OPTS=%JAVA_OPTS% -DAPI_KEY=xRp5nyiQ+B6yltBUpw==
59
+
set JAVA_OPTS=%JAVA_OPTS% -DKEPLOY_MODE=RECORD
60
+
set JAVA_OPTS=%JAVA_OPTS% -javaagent:/path/to/org.jacoco.agent-0.8.12-runtime.jar=address=*,port=36320,destfile=jacoco-it.exec,output=tcpserver
61
+
```
54
62
55
-
Replace `/path/to/`with the actual paths where you downloaded the JAR files.
63
+
Replace the placeholder values with actual paths and keys as needed.
0 commit comments