Error:(9, 39) java: cannot find symbol symbol: class, location: package

1 points
Asked by:

This morning I made git pull on my java project and I run into this error:

Error:(9, 39) java: cannot find symbol
  symbol:   class UserDto
  location: package com.tests.dto

It seems that one of my colleague made some changes in the project and now it doesn't work.
But when I asked everyone else, they said it works. What am I doing wrong?

1 answer
2 points
Answered by:

Quick solution:
Just delete target directory and compile the entire project

It works 95% of the times when I see this error.


  1. Delete entire target directory
  2. Compile entire project
  3. Run the project

Screenshot from Intellij Idea and maven module:

0 comments Add comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂