diff --git a/vardict.wdl b/vardict.wdl
index 1cd35d5864af9b4f18fb1ab52363b763b645e9cd..c79a768ffc1fc0a72c9c8506e20338a952a91d4d 100644
--- a/vardict.wdl
+++ b/vardict.wdl
@@ -22,18 +22,19 @@ task VarDict {
         Int geneColumn = 4
 
         String? preCommand
-        Int memory = 4
+        Int memory = 8
         Float memoryMultiplier = 2.0
     }
 
     String toolCommand = if defined(installDir)
         then installDir + "/VarDict"
         else if useJavaVersion
-            then "vardict-java -Xmx${memory}"
+            then "vardict-java"
             else "vardict"
 
     command {
         set -e -o pipefail
+        export JAVA_OPTS="-Xmx~{memory}G"
         ~{preCommand}
         ~{toolCommand} \
         -G ~{refFasta} \