Search code examples
eclipseazuregradleazure-service-fabricgradle-plugin

Azure SF tutorial project builds with gradle 5.4, but not with Eclipse 2019-06


I am trying to follow the Microsoft Azure Tutorial: Create an application with a Java web API front-end service and a stateful back-end service on Service Fabric and it seems to build ok with gradle 5.4 on Windows 10:

gradle cmd

However when opening the same directory with Eclipse 2019-06 (and ServiceFabric plugin) then the IDE displays the following 3 errors:

eclipse screenshot

  1. Missing Gradle project configuration folder: .settings
  2. The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
  3. The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

What is please missing here? I feel that something basic, like JDK path is maybe missing (my JAVA_HOME env. variable is set though).


Solution

  • Since File > Open Projects from File System... does not yet detect Gradle projects (you can vote for this feature with a 👍 here), you must use File > Import...: Gradle > Existing Gradle Project to open a directory as Gradle project.