The current GATK version is 3.8-0
Examples: Monday, today, last week, Mar 26, 3/26/04

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Get notifications!

You can opt in to receive email notifications, for example when your questions get answered or when there are new announcements, by following the instructions given here.

Got a problem?

1. Search using the upper-right search box, e.g. using the error message.
2. Try the latest version of tools.
3. Include tool and Java versions.
4. Tell us whether you are following GATK Best Practices.
5. Include relevant details, e.g. platform, DNA- or RNA-Seq, WES (+capture kit) or WGS (PCR-free or PCR+), paired- or single-end, read length, expected average coverage, somatic data, etc.
6. For tool errors, include the error stacktrace as well as the exact command.
7. For format issues, include the result of running ValidateSamFile for BAMs or ValidateVariants for VCFs.
8. For weird results, include an illustrative example, e.g. attach IGV screenshots according to Article#5484.
9. For a seeming variant that is uncalled, include results of following Article#1235.

Did we ask for a bug report?

Then follow instructions in Article#1894.

Formatting tip!

Wrap blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks ( ``` ) each to make a code block as demonstrated here.

Jump to another community
Download the latest Picard release at
GATK version 4.beta.3 (i.e. the third beta release) is out. See the GATK4 beta page for download and details.

Java version with QUEUE.

userNameuserName Member
edited October 2013 in Ask the GATK team

Hi team,

I have Java 1.6 installed in my system. I know that GATK works now with Java 1.7, but I work in a shared system and I can not change the default java version so I downloaded Java 1.7 and I work asigning the java version at the call:

If I run:

/jre1.7.0/bin/java -jar Queue.jar --help

works fine, but if I try:

/jre1.7.0/bin/java -jar Queue.jar -S myScala.file ....

I get the following error:

DEBUG 13:42:50,953 FunctionEdge - Starting: /Qscripts > 'java' '-Xmx2048m' '-XX:+UseParallelOldGC' '-XX:ParallelGCThreads=4' '-XX:GCTimeLimit=50' '-XX:GCHeapFreeLimit=10' '' '-cp' 'Queue.jar' 'org.broadinstitute.sting.gatk.CommandLineGATK' '-T' 'HaplotypeCaller' '-I' '/resources/exampleBAM.bam' '-R' '/resources/exampleFASTA.fasta' '-nct' '1' '-o' '/raw1.vcf' '-hets' '0.005'
INFO 13:42:50,954 FunctionEdge - Output written to /raw1.vcf.out
DEBUG 13:42:50,954 IOUtils - Deleted /raw1.vcf.out
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/broadinstitute/sting/gatk/CommandLineGATK : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
Could not find the main class: org.broadinstitute.sting.gatk.CommandLineGATK. Program will exit.

Seems like if HaplotypeCaller call java again and use the default java in the system, that is Java 1.6

Can I change the "java" version parameter?

Thanks in advance,


Best Answer


  • pdexheimerpdexheimer Member, Dev

    What if you manipulate your PATH environment variable? Put the 1.7 JRE first, and maybe even remove the entry for 1.6. It's also pretty hack-ish, but might be simpler than rebuilding Queue

  • userNameuserName Member
    edited October 2013

    Thank you very much for your answers, Johan and pdexheimer. Finally I have solved it.

    First, I tried with the pdexheimer way. I add the jre 1.7 to PATH variable and bashrc so if I did:

    $: java -version

    The output: "java version "1.7.0"" (instead java version "1.6.0")

    and for:

    $: which java

    I obtained: "myPath/jre1.7.0/bin"

    I thought that I had solved the problem but when I tried:

    $: java -jar Queue.jar -S myScala.file ....

    I get the version java error (Exception in thread "main" java.lang.UnsupportedClassVersionError: org/broadinstitute/sting/gatk/CommandLineGATK : Unsupported major.minor version 51.0). I'm not sure why...

    So I tried the Johan solution. I found where the call was:


    I just change : "def commandLine = required("java") + javaOpts + javaExecutable" by

    "def commandLine = required("/myApps/jre1.7.0/bin/java") + javaOpts + javaExecutable"

    I rebuilded Queue and now is working fine.


Sign In or Register to comment.