Lost in Compilation and Building
I'm relatively new to Java. Did it 5 years ago on Eclipse and now with your fine product. Got far enough that I'd like to build and run a Jar file, so I found this:
https://www.jetbrains.com/help/idea/compiling-applications.html#see-results
And I followed it far enough to the Manifest part and then it failed… Ok So sue me, I'm not an expert. Could you make these Tutorials or whatever you call them so that learners can follow them. Also. I'm not clear why my hand has been held during the entire editing and writing process, only to be tossed off a high place with the thing not creating a Manifest file for me. I have to use windows to create an empty Manifest.MF file? No button to “Make Default” or “Make Required” or something? I obviously have no clue about what goes in that file. Sounds like a list of interesting things. How am I supposed to know that that list is? At that point I try to run and get errors like this:
C:\Users\Storm\.jdks\openjdk-24\bin\java.exe -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -jar D:\Code\Java\Projects\ImagePanZoom\out\artifacts\ImagePanZoom_jar\ImagePanZoom.jar
no main manifest attribute, in D:\Code\Java\Projects\ImagePanZoom\out\artifacts\ImagePanZoom_jar\ImagePanZoom.jarProcess finished with exit code 1
Well I just went through the manifest part of that page above. But I still don't have one? I don't see a button, or an instruction that says “Fill up your Manifest.MF so that Intellij likes it.” and I have no clue what to type into it. So I'm stuck. I'll try to find some more help in Youtube or something but I don't think that's what you had in mind when you wrote this tutorial or this product.
So consider this my “Constructive Feedback”.
Things have been great up to now with your product, and I'm sure I'll work this out, but it's a little surprising to be dumped like this.
Oh. Look there. At some point IJ put two lines in the manifest.mf file.Looks like the default was filled in. But somehow the project doesn't know about the file and is still giving the error when I try to run it.
Please sign in to leave a comment.
Hello!
Thank you for reporting this!
I would suggest the Artifacts article, that provides a more in-depth information on this topic.
Let me know if contains the information you were looking for!