0

So, I created this JDA bot, and now i want to start it on my Ubuntu 18.04.4 VPS... On IntelliJ Idea I used "gradlew build" and i created a jar file, so I put it on my VPS.

I did: "sudo apt install openjdk-11-jre-headless"

Then I created a folder called "bot" and I put the jar file in "bot" folder. So I entered the folder and I used:

"java -jar JavaBotJDA11-1.0-SNAPSHOT.jar"

But there's an error:

Error: Could not find or load main class com.company.project.MainClass

Caused by: java.lang.ClassNotFoundException: com.company.project.MainClass

Minn
  • 5,688
  • 2
  • 15
  • 42
Fra
  • 35
  • 4
  • You didn't include your main class in the jar. – Minn Jun 09 '20 at 17:40
  • 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) – avocadoLambda Jun 09 '20 at 17:42

1 Answers1

0

You probably have not set the main class in your project. I'm not sure how it works for gradle, but I'm sure something like this should help you.

mugai
  • 31
  • 2