# How to configure applicationDefaultJvmArguments for Windows?

**URL:** <https://discuss.gradle.org/t/how-to-configure-applicationdefaultjvmarguments-for-windows/23784>\
**Category:** Help/Discuss\
**Created:** [August 18, 2017, 10:38am UTC](https://discuss.gradle.org/t/how-to-configure-applicationdefaultjvmarguments-for-windows/23784 "2017-08-18T10:38:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlo\_lf](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/carlo_lf/32/1881_2.png) [@carlo\_lf](https://discuss.gradle.org/u/carlo_lf)\
**Post date:** [August 18, 2017, 10:38am UTC](https://discuss.gradle.org/t/how-to-configure-applicationdefaultjvmarguments-for-windows/23784/1 "2017-08-18T10:38:29Z")

</div>

I’m using the following definition in my subproject:

> applicationDefaultJvmArgs = [“-Djava.library.path=APP\_HOME/lib”]

Now, the generator for the Windows batch file of the application takes this literally. But because APP\_NAME is an environment variable, in the generated script it really should be “%APP\_HOME%”.

The problem is: if I use “%APP\_HOME%” in my declaration in build.gradle, the result in the batch file is “%%APP\_HOME%%”. Thus, the script also will not work.

So now, how can I resolve this problem?
