# Extend classpath, additional system properties

**URL:** <https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157>\
**Category:** Old Forum Archive\
**Created:** [June 27, 2013, 12:29pm UTC](https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157 "2013-06-27T12:29:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rupert\_thurner](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rupert_thurner/32/151_2.png) [@rupert\_thurner](https://discuss.gradle.org/u/rupert_thurner)\
**Post date:** [June 27, 2013, 12:29pm UTC](https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157/1 "2013-06-27T12:29:00Z")

</div>

we have a framework which is included in all java programs run by adding a shell variable to the classpath, and a shell variable for the system properties: java -cp %FRAMEWORKCP% %FRAMWORKJAVAPROPERTIES% …

framworkproperties includes security settings which must be there on start of the jvm, like -Djava.security.properties .

what would be the best way to include such settings into calls to gradle?

---

<div class="post-metadata">

**Author:** ![rupert\_thurner](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rupert_thurner/32/151_2.png) [@rupert\_thurner](https://discuss.gradle.org/u/rupert_thurner)\
**Post date:** [June 27, 2013, 12:33pm UTC](https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157/2 "2013-06-27T12:33:00Z")

</div>

i should have added: how would one add these to unit tests as well?

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [June 27, 2013, 1:50pm UTC](https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157/3 "2013-06-27T13:50:00Z")

</div>

So you need to configure the Gradle process itself? Or something that it is running?

---

<div class="post-metadata">

**Author:** ![rupert\_thurner](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rupert_thurner/32/151_2.png) [@rupert\_thurner](https://discuss.gradle.org/u/rupert_thurner)\
**Post date:** [June 27, 2013, 2:58pm UTC](https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157/4 "2013-06-27T14:58:00Z")

</div>

yes, a gradle plugin is compiled, and unit tested with gradle. one method needs to set security parameters to do x509 authentication, i.e. a couple of jar files into the class path, and system parameters.

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [June 27, 2013, 6:29pm UTC](https://discuss.gradle.org/t/extend-classpath-additional-system-properties/6157/5 "2013-06-27T18:29:00Z")

</div>

I don’t think you need these for the Gradle process. You need them for the test process.

You can configure the system properties for the test task.

[http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.Test.html](http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.Test.html)
