0

Hi I am working on a project and I have imported it via gitHub. I am importing it as a general project, it won't work otherwise. The problem I have is that there is no buildpath for the project. From java I can't run any of the files but I can run it fine in source tree with gradle.

I have read up on it and it says the way to fix it is:

Right-click > properties > build path

That or similar options but in my eclipse there is no BUILD PATH option.

Properties Menu


I have tried looking at some fixes here and here. From the second link I have found that the following files are missing:

.classpath
.settings/*
Community
  • 1
  • 1
Jean de Toit
  • 127
  • 9

1 Answers1

0

If the project has a gradle wrapper in the root of the project then use it to invoke the tasks cleanEclipse eclipse to produce the eclipse artifacts.

Assuming you're on unix type system:

./gradlew cleanEclipse eclipse

If you're on windows, use gradlew.bat instead.

If the GitHub project didn't have a gradle wrapper, then you can use a system version of gradle instead.

This all assumes the project has following in it. If not add it to the main build script:

apply plugin: 'eclipse'
Mark Fisher
  • 9,838
  • 3
  • 32
  • 38
  • 1
    Is there a similar solution if you don't use Gradle/Maven but only use manual classpaths? – d-b Nov 17 '20 at 11:14
  • i simply wouldn't advise doing that. gradle is simple to setup for projects, but if you insist on this, i would open a new question in slack describing your build process and get solutions there rather than on this 5 year old thread – Mark Fisher Nov 18 '20 at 12:19