0

I have three .java files(Main, Convertor and UserBean) in which two(Main and Convertor) have main class in them. I created a manifest text file with the data: Main-Class: com.w.model.Convertor

I created the jar file typing: jar -cvfm myjar.jar Manifest.txt *.class

When i try to run the jar file in cmd, i'm getting the error: "Error: Could not find or load main class com.w.model.Convertor"

I have also set the Path and classPath but it is not working

what should i do to solve this?

Note: im not working using and developing app. Just notepad and cmdtri

Coding
  • 11
  • 3

1 Answers1

0

What command do you use to run the jar file?

Below is the command to run an executable jar file:

java -jar jarfile.jar

You can find an example here: Could not find or load main class with a Jar File

Community
  • 1
  • 1