Incorrect bytecode version stamp

"Jan Tosovsky" <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
Dear All,

when building Apache Batik tools using Oracle JDK 7u80 (most recent free) to
ensure they will work on JDK 7, I am getting weird result (Win 10).

While in MANIFEST can be found 'created by' JDK 7, when that main class is
executed in JDK 7, executing of the main class fails because of unsupported
version (major.minor 52.0).

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.7
Created-By: 1.7.0_80-b15 (Oracle Corporation)
Implementation-Title: Batik SVG rasterizer
Implementation-Version: svn-trunk
Implementation-Vendor: The Apache Software Foundation (http://xmlgraph
 ics.apache.org/batik/)
Main-Class: org.apache.batik.apps.rasterizer.Main
Build-Id: 20161220-223305-CET (Honza [Windows 8.1 6.3 amd64, Java 1.7.
 0_80-b15])

I suspect this is Ant/compiler issue of incorrectly written version stamp
into class files. Or is there other explanation how JDK 7 can produce JDK 8
bytecode?

There is JDK8 installed on my PC as well, but both JAVA_HOME and PATH
variables point to the JDK7. Is it possible Ant could bypass this settings
internally? Is that MANIFEST 'created by' value reliable?

Thanks,

Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.