NotAlexNoyle 1c9a77f3f5 Merge pull request #2 from SKBotNL/main
Correctly set i and fsize after substitution, fix crash and code cleanup
2026-04-05 12:31:19 -04:00
2025-11-17 20:29:49 +01:00
2025-11-17 20:29:49 +01:00
2025-11-17 20:29:49 +01:00
2026-04-05 18:28:32 +02:00
2025-11-17 20:29:49 +01:00
2025-11-17 20:29:49 +01:00
2026-01-21 18:08:31 +01:00

SubstAgent-JVMTI

A Java Agent written in C that listens for strings containing environment variables and substitutes them accordingly. It is intended for use with Spigot plugins to enable environment variable support in their configuration files.

How to use

java -agentpath:/full/path/to/libsubstagent.so [rest of your command as normal]
For example:
java -agentpath:/full/path/to/libsubstagent.so -jar server.jar nogui

You can now use environment variables in your config files like so:
^{ENV_VAR_NAME}

How to build

$ git clone https://github.com/SKBotNL/SubstAgent-JVMTI
$ cd SubstAgent-JVMTI
$ mkdir build
$ cd build
$ cmake ..
$ make

Tests

The test script assumes that the generator is set to make (-G "Unix Makefiles")

S
Description
A Java Agent written in C that listens for strings containing environment variables and substitutes them accordingly.
Readme Unlicense
685 KiB
0 Stars 2 Watchers 0 Forks
Languages
C 84.5%
Shell 10.6%
CMake 4.9%