0

enter image description here

I was following the tutorial from jetBrains and this error occured. Docker can't find my Main class.How to solve this?

My image name is hello-world:1.0

  • afaik it a com.company.Main class needs to be in side a `com/company/` folder. If i read your dockerfile correctly, that's not what is happening. I am not sure that this is the issue though. – f1sh Jan 19 '22 at 12:54
  • Seems that already starting docker fails? – GhostCat Jan 19 '22 at 12:55
  • 3
    You don't *have* a class called Main. You've got a class called `com.company.Main` that you're trying to use *as if* it's called Main. Note that this has nothing to do with Docker - you'd see the same thing if you just ran `java Main` locally. – Jon Skeet Jan 19 '22 at 12:56
  • 1
    Does this answer your question? [What does "Could not find or load main class" mean?](https://stackoverflow.com/questions/18093928/what-does-could-not-find-or-load-main-class-mean) – Uwe Plonus Jan 19 '22 at 12:58
  • i changed cmd to com.company.Main it still can't find it – Captain Adil Jan 19 '22 at 13:31

0 Answers0