Changeset 35910 in osm for applications/editors


Ignore:
Timestamp:
2022-02-07T16:19:11+01:00 (3 years ago)
Author:
taylor.smock
Message:

opendata: Appropriately set the Java release version

This fixes #21830: java.lang.UnsupportedClassVersionError when trying to open *.ods file

This was caused by compiling the opendata plugin with Java 11, where everything
in the includes directory was compiled with Java 11 instead of Java 8
(java.lang.version defaults to Java 8).

Location:
applications/editors/josm/plugins/opendata
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/build.xml

    r35899 r35910  
    3434    <target name="compile_poi" depends="init">
    3535        <echo message="compiling Apache POI ... "/>
    36         <javac srcdir="includes/org/apache/poi" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1" />
     36        <javac srcdir="includes/org/apache/poi" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1" release="${java.lang.version}" />
    3737    </target>
    3838    <!--
     
    4343    <target name="compile_jopendoc" depends="init">
    4444        <echo message="compiling JOpenDocument ... "/>
    45         <javac srcdir="includes/org/jopendocument" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1" >
     45        <javac srcdir="includes/org/jopendocument" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1" release="${java.lang.version}">
    4646            <classpath>
    4747                <!-- JDOM is required in an older version than the one embedded in geotools jar -->
     
    5858    <target name="compile_j7zip" depends="init">
    5959        <echo message="compiling J7Zip ... "/>
    60         <javac srcdir="includes/org/j7zip" debug="true" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" />
     60        <javac srcdir="includes/org/j7zip" debug="true" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" release="${java.lang.version}" />
    6161    </target>
    6262    <!--
     
    6767    <target name="compile_neptune" depends="init, xjc_neptune">
    6868        <echo message="compiling Neptune ... "/>
    69         <javac srcdir="includes/neptune" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8">
     69        <javac srcdir="includes/neptune" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" release="${java.lang.version}">
    7070            <classpath>
    7171                <fileset refid="jaxb.jars"/>
  • applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java

    r35899 r35910  
    2323     * Setup test.
    2424     */
    25     RegisterExtension
     25    @RegisterExtension
    2626    JOSMTestRules rules = new JOSMTestRules().projection();
    2727
Note: See TracChangeset for help on using the changeset viewer.