I'm trying to run the Java program trimmomatic.jar and I'm getting an error related to "initial heap". Any idea what this is?

java -Xmx500 -jar trimmomatic.jar PE -threads 20 -phred33 ../ERR318658.1.fastq ../ERR318658.2.fastq ERR318658.1_kneaddata.trimmed.1.fastq ERR318658.1_kneaddata.trimmed.single.1.fastq ERR318658.1_kneaddata.trimmed.2.fastq ERR318658.1_kneaddata.trimmed.single.2.fastq


Error occurred during initialization of VM
Too small initial heap
  • 1
    It works when I remove the parameter "-Xmx500" Nov 11 '20 at 10:08

As stated in this response :

This value must a multiple of 1024 greater than 2MB.


Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes.

So you should get better results with -Xmx500m because -Xmx500 means you launch the JVM with max memory of 500 bytes, which is far too small AND not a multiple of 1024 !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.