Reputation: 1
I have been searching for this and nothing has helped, I'm trying to run the main class but keep getting an error. I am running this
java -classpath .\target\classes com.discordbot.Updated_Discord_Bot.Utils.Main
My main file is located in MAIN_FOLDER\target\classes\com\discordbot\Updated_Discord_Bot/Utils/Main.class
I have tried multiple commands and got nothing.
I want to run the main class located in MAIN_FOLDER\target\classes\com\discordbot\Updated_Discord_Bot/Utils/Main.class
but keep getting this error, any help please?
Upvotes: 0
Views: 2032
Reputation: 258
I tried java -cp target\classes com.discordbot.Updated_Discord_Bot.Utils.Main
from Windows Command Line tool and standing on MainFolder
in the CMD tool. The full path is like this
MainFolder\target\classes\com\discordbot\Updated_Discord_Bot\Utils
Where MainFolder
is anywhere. All worked fine. What error do you get ? Are you sure all your .class files are generated ?
Upvotes: 1