0

I'm trying to migrate my eclipse install from one workstation to another. I primarily work with Selenium, so I've copied my workspaces, imported the projects and imported the appropriate jars. However, I am still getting a lot of errors including some stating the import statements are failing to find certain packages.

Half of the errors cleared when I finished importing the last of the jars, but it seems like it's missing something. Basically guessing at this point, I right clicked my project and hit "build project", which cleared the import errors, but the rest of my code has errors indicating things are not imported correctly. I have a feeling the build path is still not configured correctly. Is there a way I can look at my old PC and see what files the import statement is looking for?

Gabriel
  • 464
  • 4
  • 17
fudge
  • 189
  • 1
  • 6
  • 18
  • 1
    You could look at the build path to see whats there, and whats missing on the new PC. – NickL Apr 16 '18 at 22:27
  • 1
    You should look at Maven or Gradle - it makes problems such as this a complete non-issue. – SiKing Apr 16 '18 at 23:46
  • Eclipse might be able to help you fix your import statements, see https://stackoverflow.com/questions/3982885/can-eclipse-be-configured-to-automatically-fix-missing-imports – Michael Osofsky Apr 16 '18 at 23:48

1 Answers1

1

When you copied the files to another machine, and imported the project, some jars were not properly added to the classpath. So the compiler complained about not being able to find a class/package in an import statement. You can definitely have a look at the old work station, and look at the project imported jars. You can find those by:

Right click on the project in "Project Explorer", and select "Build Path > Configure Build Path".

This will give you an idea about what you are missing. Alternatively, (if the libraries you are missing are third party), you can google the missing import statement, and get a clue in which jar (library) contains the jar, then download and add it to the classpath of the project.

Mansour
  • 614
  • 1
  • 5
  • 13