1

I have a java project: simple telegram bot. It worked while I didn't tried deploy it on Heroku. I did a backup for stable version, but Eclipse keeps showing me this ERROR. IDK what's wrong with it, I tried a lot of stuff, like what's the problem? I have src folder, classes also, I have main... Maybe problem in .gitignore file? But I deleted from it *.class, it's still not working. Help It's not a duplicate, because I'm workin in Eclipse and it worked earlier. Added my folder properties. I need short answer, not just a wiki of possible problems because it doesnt help. Folder props

Screenshot error and folders

Arzybek
  • 547
  • 2
  • 6
  • 27
  • Possible duplicate of [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) – Karan Shishoo Oct 29 '18 at 10:31
  • 1
    Please don't post screenshots of errors. It's hard for search engines to index, hard for some people to read, etc etc – Michael Oct 29 '18 at 10:32
  • @Michael Its not just a screenshot of Error, it shows my folders – Arzybek Oct 29 '18 at 10:37

1 Answers1

0

Your project configuration is very bizarre; you have class files in a directory named 'SRC'. It's hard to tell what you did to manage to create a project def this bizarre. Some ideas:

  • You've compiled this on the command line. You should probably look into build systems like maven or gradle to build your code. Even if not, use the -d switch on javac to ensure the class files end up in a directory named 'bin' or 'build'.

  • You've turned off eclipse's autocompile function. Turn it back on.

  • Right click your Point.java file (not Point.class) and pick 'run...' from the context menu. Assuming autocompile is on this will work.

  • Generally, use packages. Stuff in the default package is unrunnable in various scenarios. From what I can tell you're not in one of those 'default package is not runnable' scenarios but perhaps I'm missing something.

rzwitserloot
  • 85,357
  • 5
  • 51
  • 72
  • Build automatically is on, I also haved bin folder, but it didnt work so I added classes and java files in one folder but it doesnt work – Arzybek Oct 29 '18 at 10:44