Custom Script Environment Variables in Java

Hi, I’ve never worked with Environment Variables before, I’ve got Sonarr running on a Windows 10 machine, and I’ve gotten interested in the custom scripts section.

I was wondering if it’s possible to use the custom script feature to launch a .jar and then use the environment variables inside of the jar?

Custom script settings:
Path: c:\location\to\java.exe
Arguments: -jar c:\some\location\file.jar

In your Java code:
System.getenv("Sonarr_...")

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.