2

I upgraded from Neon to Oxygen and now many of my projects with Ant builds get the error

"Java Virtual Machine Launcher - A Java Exception has occurred"

First, my situation is NOT the same as 18453100. I reset the Ant classpath defaults to no effect. And deleting all the metadata caused Ant builds in all projects to fail.

I have found that copying an ant build.xml in a project that works to a similar project where builds did not work caused the Ant build to now get the JVM error.

What I did discover that in Run Configuration - Classpath - Additional Tasks & Support, Ant tasks in projects that work have about 20 entries, whereas when that same file is copied to a new project then there are only 5 entries. And going back to Neon, all those run configurations have the same 5 entries. And BTW the Ant Home classpath entries are the same (Default) in all projects.

Classpath in Neon and non-working Oxygen projects enter image description here

Classpath in Oxygen working projects enter image description here

So I'm thinking that the upgrade to oxygen did not add those extra 15 references to the classpath for some projects. But I cannot find anything in the project properties to correct that. Doing it one by one for over a dozen projects is not what I had in mind.

Would anyone know how to reset those? Or any other way?

Fred Andrews
  • 648
  • 9
  • 18

2 Answers2

2

for me below worked (eclipse oxygen and I wanted to compile with 1.7):

windows-preferences-Ant Runtime- -under Ant Home Entries remove all eclipse jar and include all ant libraries -under global entries (point it to tools.jar of 1.7) -build.xml-> external tools configuration-->remove your existing build.xml-->and under JRE tab - "Separate JRE"-->point it to your JDK 1.7

0

Install lower version of Ant (for example 1.9.x for jdk 7) and set this ant directory as ant home in "Window > Preferences > Ant > Runtime: Classpath tab"

Abdullah Ahçı
  • 786
  • 10
  • 19