0
I was studying how to compile java straight through javac and everything else. Then I joined all the files into a zip and renamed it . jar . It didn’t work at first due to lack of Manifest - didn’t find the main class'
But even if I entered directly using -cp the error persists.
When I added the manifest I appeared to Mensagen : Invalid or corrupted jarfile
I had a hypothesis that a jar would not be exactly a zip, but even if I extracted a jar(functional) and compacted again, nothing wrong happens. What mistake I made then?
What is the doubt? Apparently you yourself clarified in the text.
– user28595
I edited, I think I’m really bad at making things clear
– Rodrigo Santiago
Vc compact the files that belong to the jar to zip, and changed the extension to jar? If that’s what it was, I don’t think it’s gonna run at all, I’m not sure if it runs normal.
– gato
There is a tool that is part of the SDK that serves for this. Have a look at https://docs.oracle.com/javase/tutorial/deployment/jar/build.html . If you don’t succeed because of English, please let me know that I will give you a full reply in Portuguese as soon as I can test.
– Pablo Almeida