Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help RE: adding manifest file to JAR file  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know why, but I can't get my version of the manifest file into the jar file I create. I know I'm putting in the right command, but when I check the manifest file in the JAR archive, it's just the default one supplied by sun.
Is there a way to extract that one and insert my one manifest file?
 
author and jackaroo
Marshal Commander
Posts: 12168
256
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob,
Care to post your command line?
Regards, Andrew
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob to give you an idea, here is my server jar command that adds my manifest file to it.

as you can see I have my manifest file located in the c:\devexam\manifest\server directory. The "-cvfm" shows that the 'm' means that you are going to tell where the manifest file is.
Mark
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,
I had the same problem simply because I did not include a new line after the last entry in the manifest file.
e.g. content in the manifest.mf file
Manifest-Version: 1.0
Main-Class: package.classname
<-- make sure you have a new line here...
... otherwise the Main-Class will not be included in the created manifest file in the jar file.
jamalag
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!