Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. The first step is to extract the JAR file.


  2. Once all the files are extracted, locate the META-INF folder. Inside the folder you will find a file called "MANIFEST.MF"
  3. The below screen shows the content of the MANIFEST file. You can open the file with any standard text editor. In this example, lets update the file with "Application-Name" and "Permissions" attributes. 


  4. Lets create a new text file "manifest-attributes.txt" with the following content - "Application-Name: Nexaweb Client" and "Permissions: all-permissions".  The text file has to be created outside of the JAR file. Also, make sure that
    you press carriage return after the last attribute that you specify in the text file - this is VERY IMPORTANT. This is shown in the screenshot below - 


  5. Now we need to transfer the contents of the "manifest-attributes.txt" text file to the MANIFEST.MF of the JAR file. For that we will use the jar tool in command prompt. First lets make sure that the text file and the JAR file are in the same directory. Open the command prompt and browse to this directory. 
  6. In the command prompt, type in the following command: jar umf  name-of-text-file.txt name of JAR file.jar
    For our example, the command will look like this: jar umf manifest-attributes.txt NexawebClient.jar
    Then press enter. The prompt will return to a new line without any report as shown in the screenshot below - 


  7. Next, we will check the contents of the new MANIFEST file to see whether the updates took place. Repeat steps 1 and 2 to extract the contents of the JAR file and open the MANIFEST file. In our example, it got updated with the attributes we wanted. 


  8. Now that we have confirmed the changes that we wanted, we can go ahead and use the JAR file in our application deployment. 

    For more information about manifest files, look up: https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html


...