diff --git a/ecj.spec b/ecj.spec
index 3c218e5..b1ae279 100644
--- a/ecj.spec
+++ b/ecj.spec
@@ -43,8 +43,7 @@ Patch0: %{name}-rpmdebuginfo.patch
# Include java API stubs in build with java < 15
Patch1: javaAPI.patch
BuildRequires: ant
-BuildRequires: java-devel = 1.8.0
-BuildRequires: java-devel = 11
+BuildRequires: java-devel >= 10
BuildRequires: javapackages-local
BuildRequires: unzip
BuildArch: noarch
@@ -74,7 +73,7 @@ rm META-INF/ECLIPSE_*
%build
mkdir -p build/classes
-javac --patch-module java.compiler=java15api-src -XDignore.symbol.file=true -d build/classes -source 11 -target 11 \
+javac --patch-module java.compiler=java15api-src -XDignore.symbol.file=true -d build/classes --release 10 \
$(find java15api-src/javax -name \*.java | xargs)
jar -cf java15api.jar -C build/classes .
# Remove everything except the jar, since ant looks for java files in "."
@@ -82,7 +81,7 @@ rm -rf java15api-src build/classes
ant \
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
- -Djavaapi=java15api.jar -Drtjar=%{_jvmdir}/jre-1.8.0/lib/rt.jar \
+ -Djavaapi=java15api.jar \
%endif
build
@@ -96,8 +95,7 @@ install -pm 0644 java15api.jar %{buildroot}%{_javadir}/%{name}/java15api.jar
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/ecj.pom
%add_maven_depmap %{name}/ecj.pom %{name}/ecj.jar -a "org.eclipse.jdt:core,org.eclipse.jdt.core.compiler:ecj,org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.tycho:org.eclipse.jdt.compiler.apt"
-install -pm 0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}/java15api.pom
-%add_maven_depmap %{name}/java15api.pom %{name}/java15api.jar -a "org.eclipse:java9api"
+%add_maven_depmap org.eclipse:java15api:15 %{name}/java15api.jar -a "org.eclipse:java9api,org.eclipse:java10api"
# Install the ecj wrapper script
%jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true
diff --git a/javaAPI.patch b/javaAPI.patch
index ee011ed..b71762e 100644
--- a/javaAPI.patch
+++ b/javaAPI.patch
@@ -1,25 +1,24 @@
--- build.xml.orig 2020-09-02 22:05:12.000000000 +0200
+++ build.xml 2021-03-16 14:41:19.331235267 +0100
-@@ -18,6 +18,10 @@
+@@ -18,16 +18,20 @@
+
+
-+
+
-@@ -25,9 +29,11 @@
+
-
+-
++