# Invalid or corrupt jar file error from Trimmomatic

**URL:** <https://forum.biobakery.org/t/invalid-or-corrupt-jar-file-error-from-trimmomatic/7540>\
**Category:** KneadData\
**Created:** [November 1, 2024, 9:04am UTC](https://forum.biobakery.org/t/invalid-or-corrupt-jar-file-error-from-trimmomatic/7540 "2024-11-01T09:04:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitty\_Gritty](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/nitty_gritty/32/3059_2.png) [@Nitty\_Gritty](https://forum.biobakery.org/u/Nitty_Gritty)\
**Post date:** [November 1, 2024, 9:04am UTC](https://forum.biobakery.org/t/invalid-or-corrupt-jar-file-error-from-trimmomatic/7540/1 "2024-11-01T09:04:56Z")

</div>

When I run a command as follows

* * *

mkdir -p $OUTPUT\_DIR

for i in {2..45}  
do  
if [$i -eq 6] || [$i -eq 30]; then  
continue  
fi

INPUT1=“./${i}\_1.fq.gz”  
INPUT2=“./${i}\_2.fq.gz”

kneaddata --input1 $INPUT1 --input2 $INPUT2   
–reference-db ./hostgenome/   
–output ${OUTPUT\_DIR}/Sample\_${i}   
–trimmomatic-options=“MINLEN:90”   
–threads 120

## done

Then, an error message like below returned

* * *

Decompressing gzipped file …

Decompressing gzipped file …

Reformatting file sequence identifiers …

Reformatting file sequence identifiers …

Reordering read identifiers …

Initial number of reads ( /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/reordered\_4078pz9p\_reformatted\_identifiersp9uic1je\_decompressed\_6begby74\_2\_1 ): 41168182.0  
Initial number of reads ( /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/reordered\_e8o17fuu\_reformatted\_identifiers5oezloh1\_decompressed\_of0gd9pz\_2\_2 ): 41168182.0  
Running Trimmomatic …  
CRITICAL ERROR: Error executing: java -Xmx500m -jar /home/jwhuh/.conda/envs/kneaddata/bin/trimmomatic PE -threads 120 -phred33 /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/reordered\_4078pz9p\_reformatted\_identifiersp9uic1je\_decompressed\_6begby74\_2\_1 /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/reordered\_e8o17fuu\_reformatted\_identifiers5oezloh1\_decompressed\_of0gd9pz\_2\_2 /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/2\_1\_kneaddata.trimmed.1.fastq /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/2\_1\_kneaddata.trimmed.single.1.fastq /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/2\_1\_kneaddata.trimmed.2.fastq /data/jwhuh/CRC\_metagenome\_raw/fastq/kneaddataOutputPairedEnd/Sample\_2/2\_1\_kneaddata.trimmed.single.2.fastq MINLEN:90

Error message returned from Trimmomatic :  
Error: Invalid or corrupt jarfile /home/jwhuh/.conda/envs/kneaddata/bin/trimmomatic

I set a proper path but it doesn’t fix the problem.  
Thank you for your time
