This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strange case with jar tool

 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In order to create jar file, I did the following for my server.jar.
1) change to classes directory
2) create a to be imported manifest file called
ServerManifest.MF
with it content:
Main-Class: suncertify.server.Server
3) I create jar by issuing
jar -cvmf ServerManifest.MF server.jar suncertify/db suncertify/server
4) I tried to run the server using
java -jar server.jar 1099
It failed.
5) I checked the jar file
jar -tvf server.jar
The suncertify.server.Server is there
6) I checked the content of Manifest.MF
It does not include the statement I put in ServerManifest.MF
7) I tried to merge them
jar ufm server.jar ServerManifest.MF
The result is the same.
I do not think that the jar command I used are wrong.
Question: What's wrong with jar tool ? Why can't I get the result I want. I am using JSDK 1.4.1_02
Thanks,
John Chien
 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I found the solution.
I think my brain is not clear today.
The book told me that the file to be inserted into the real manifest file should end with a carrige return or new line. Otherwise, it won't work.
I just forget what the book said.
Sorry to bother you.
Thanks,
John Chien
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic