As we have uplifted Java version to java 11 and we are facing below exception while running the build.
Is it because Ant4Eclipse lib is not compatible with the java version(java 11) we are using? not sure
Is anyone come across the same issue I have downloaded ant4eclpise jar file from the below link A4E_2018-01-03
Need your help
BUILD FAILED E:\servicelayer\Build\build.xml:98: The following error occurred while executing this line: E:\servicelayer\Build\build.xml:114: org.ant4eclipse.lib.core.exception.Ant4EclipseException: Exception whilst resolving the classpath entry '[EclipseClasspathEntry: path: org.eclipse.jdt.launching.JRE_CONTAINER entryKind: 0 outputLocation: null exported: false]' of project 'CommonEventModel': 'Index 1 out of bounds for length 1' at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolveClasspathEntries(ClasspathEntryResolverExecutor.java:256) at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolveReferencedProject(ClasspathEntryResolverExecutor.java:233) at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolve(ClasspathEntryResolverExecutor.java:168) at org.ant4eclipse.lib.jdt.internal.tools.JdtReferencedProjectResolverImpl.resolveReferencedProjects(JdtReferencedProjectResolverImpl.java:63) at org.ant4eclipse.lib.platform.internal.tools.ReferencedProjectsResolverServiceImpl.resolveReferencedProjects(ReferencedProjectsResolverServiceImpl.java:78) at org.ant4eclipse.lib.platform.internal.tools.ReferencedProjectsResolverServiceImpl.resolveReferencedProjects(ReferencedProjectsResolverServiceImpl.java:98) at org.ant4eclipse.lib.platform.tools.BuildOrderResolver.resolveBuildOrder(BuildOrderResolver.java:73) at org.ant4eclipse.ant.platform.ExecuteProjectSetTask.doExecute(ExecuteProjectSetTask.java:201) at org.ant4eclipse.ant.core.AbstractAnt4EclipseTask.execute(AbstractAnt4EclipseTask.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.Project.executeTarget(Project.java:1376) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.apache.tools.ant.Main.runBuild(Main.java:854) at org.apache.tools.ant.Main.startAnt(Main.java:236) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at org.ant4eclipse.lib.jdt.internal.model.jre.JavaRuntimeLoader.getVmProfile(JavaRuntimeLoader.java:184) at org.ant4eclipse.lib.jdt.internal.model.jre.JavaRuntimeLoader.loadJavaRuntime(JavaRuntimeLoader.java:112) at org.ant4eclipse.lib.jdt.internal.model.jre.JavaRuntimeRegistryImpl.getJavaRuntimeFromJavaHome(JavaRuntimeRegistryImpl.java:352) at org.ant4eclipse.lib.jdt.internal.model.jre.JavaRuntimeRegistryImpl.getDefaultJavaRuntime(JavaRuntimeRegistryImpl.java:225) at org.ant4eclipse.lib.jdt.internal.tools.container.JreContainerResolver.resolveContainer(JreContainerResolver.java:59) at org.ant4eclipse.lib.jdt.internal.tools.classpathentry.ContainerClasspathEntryResolver.resolve(ContainerClasspathEntryResolver.java:108) at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolveClasspathEntry(ClasspathEntryResolverExecutor.java:280) at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolveClasspathEntries(ClasspathEntryResolverExecutor.java:252) ... 37 more
Total time: 1 second
I assume you are running Eclipse using a Java11 VM - this is required since Eclipse 4.17. (https://wiki.eclipse.org/Eclipse/Installation#Eclipse_4.17_.282020-09.29)
I'm facing the same problem as you and as a workaround currently I'm using ant4eclipse from Eclipse 4.16 running in a Java 8 VM.