pmachovec
pmachovec

Reputation: 103

Refresh Gradle Project in Eclipse rewrites project settings

In Eclipse when I right click on a Gradle project and select Gradle -> Refresh Gradle Project, it changes the project JDK to JRE System Library (unbound) and Java compliance to 1.4 or lower. The same happens when I run tasks gradle cleanEclipse eclipse.

Any idea how to prevent that? Most likely how to set the project in the eclipse {...} block? Thanks...

Upvotes: 5

Views: 2042

Answers (1)

pmachovec
pmachovec

Reputation: 103

I figured it out! I had to specify the JVM path in eclipse.ini. After adding this:

-vm
PATH_TO_THE_JDK\bin\javaw.exe

above the -vmargs option it's resolved.

The compliance level stays on 10. The JDK keeps switching to JavaSE-10, but it's no more unbound and the syntax checker also stopped screaming about missing libraries.

Upvotes: 2

Related Questions