I have a JAR
which accepts environment variable options. When I run the main class manually by setting run configuration, I provide environment variable as : KERBOROS_KEYTAB_LOC="location of the keytab file"
Now I need to set these options while running the JAR
. How I can set that? I tried below option but it is not working.
java -DKERBOROS_KEYTAB_LOC="location of the keytab file" -jar jarfile.jar
-D
sets a Java system property, not an environment variable. These are different and separate mechanisms that can be used for roughly similar purposes.