R
R
Ruslan2017-06-10 14:14:29
Java
Ruslan, 2017-06-10 14:14:29

How to diagnose jar file launch problem?

Hello!
I built a jar -
I try to run it with the command: java -jar testjar.jar
as a result I get an error message:
Error: Could not find or load main class pak.Main
To diagnose the problem, I opened the jar file with 7-zip, as if this is an archive: inside there is a META-INF \ MANIFEST.MF file, in which the class to be launched is registered: "Main-Class: pak.Main"
there is also a pak \ Main.class file in the jar file (I extracted it from the archive, opened it in IDE, it is quite correct for itself, the pak package is defined there, inside which the Main class with the static main method)
looks (in my naive opinion) everything is fine, I don’t understand why such an error.
tell me how to find the problem?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-06-10
@sim3x

https://stackoverflow.com/questions/7485670/error-...
https://www.google.com.ua/search?q=Error%3A+Could+...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question