Linux: what is a most convenient way to see the content of .jar file











up vote
20
down vote

favorite
4












What is a most convenient way to see the content of .jar file w/o using unzip/untar commands?
What I'd like to do - is to browsing inside using cd command like it is the usual folder,
seeing content, size of classes - 'ls -la'.



MC allowed to do so on the fly. Is there are any ease-in-use alternative?










share|improve this question






















  • superuser.com/questions/216617/zip-linux-view-files-in-archive
    – cutrightjm
    Apr 27 '12 at 12:49










  • @ekaj less and unzip doesnt help me - it doesn't show me the size of files in the archive for example, or date&time of last modification (unless I'll decompress it somewhere to /tmp/AAA and then will run ls -la against /tmp/AAA - which is what I want to avoid).
    – javagirl
    May 1 '12 at 17:20










  • Don't unzip the .zip file, just open it. You can see the sizes and modification dates.
    – cutrightjm
    May 2 '12 at 12:06












  • how can I open it in the linux server command line?
    – javagirl
    May 3 '12 at 15:34










  • @javagirl: unzip -l does show you the size of files in the archive and date & time of last modification without unpacking the package. See my answer below. Actually, this is a duplicate as ekaj suggested.
    – DevSolar
    Jun 19 '12 at 11:53

















up vote
20
down vote

favorite
4












What is a most convenient way to see the content of .jar file w/o using unzip/untar commands?
What I'd like to do - is to browsing inside using cd command like it is the usual folder,
seeing content, size of classes - 'ls -la'.



MC allowed to do so on the fly. Is there are any ease-in-use alternative?










share|improve this question






















  • superuser.com/questions/216617/zip-linux-view-files-in-archive
    – cutrightjm
    Apr 27 '12 at 12:49










  • @ekaj less and unzip doesnt help me - it doesn't show me the size of files in the archive for example, or date&time of last modification (unless I'll decompress it somewhere to /tmp/AAA and then will run ls -la against /tmp/AAA - which is what I want to avoid).
    – javagirl
    May 1 '12 at 17:20










  • Don't unzip the .zip file, just open it. You can see the sizes and modification dates.
    – cutrightjm
    May 2 '12 at 12:06












  • how can I open it in the linux server command line?
    – javagirl
    May 3 '12 at 15:34










  • @javagirl: unzip -l does show you the size of files in the archive and date & time of last modification without unpacking the package. See my answer below. Actually, this is a duplicate as ekaj suggested.
    – DevSolar
    Jun 19 '12 at 11:53















up vote
20
down vote

favorite
4









up vote
20
down vote

favorite
4






4





What is a most convenient way to see the content of .jar file w/o using unzip/untar commands?
What I'd like to do - is to browsing inside using cd command like it is the usual folder,
seeing content, size of classes - 'ls -la'.



MC allowed to do so on the fly. Is there are any ease-in-use alternative?










share|improve this question













What is a most convenient way to see the content of .jar file w/o using unzip/untar commands?
What I'd like to do - is to browsing inside using cd command like it is the usual folder,
seeing content, size of classes - 'ls -la'.



MC allowed to do so on the fly. Is there are any ease-in-use alternative?







linux tar






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 27 '12 at 12:37









javagirl

207126




207126












  • superuser.com/questions/216617/zip-linux-view-files-in-archive
    – cutrightjm
    Apr 27 '12 at 12:49










  • @ekaj less and unzip doesnt help me - it doesn't show me the size of files in the archive for example, or date&time of last modification (unless I'll decompress it somewhere to /tmp/AAA and then will run ls -la against /tmp/AAA - which is what I want to avoid).
    – javagirl
    May 1 '12 at 17:20










  • Don't unzip the .zip file, just open it. You can see the sizes and modification dates.
    – cutrightjm
    May 2 '12 at 12:06












  • how can I open it in the linux server command line?
    – javagirl
    May 3 '12 at 15:34










  • @javagirl: unzip -l does show you the size of files in the archive and date & time of last modification without unpacking the package. See my answer below. Actually, this is a duplicate as ekaj suggested.
    – DevSolar
    Jun 19 '12 at 11:53




















  • superuser.com/questions/216617/zip-linux-view-files-in-archive
    – cutrightjm
    Apr 27 '12 at 12:49










  • @ekaj less and unzip doesnt help me - it doesn't show me the size of files in the archive for example, or date&time of last modification (unless I'll decompress it somewhere to /tmp/AAA and then will run ls -la against /tmp/AAA - which is what I want to avoid).
    – javagirl
    May 1 '12 at 17:20










  • Don't unzip the .zip file, just open it. You can see the sizes and modification dates.
    – cutrightjm
    May 2 '12 at 12:06












  • how can I open it in the linux server command line?
    – javagirl
    May 3 '12 at 15:34










  • @javagirl: unzip -l does show you the size of files in the archive and date & time of last modification without unpacking the package. See my answer below. Actually, this is a duplicate as ekaj suggested.
    – DevSolar
    Jun 19 '12 at 11:53


















superuser.com/questions/216617/zip-linux-view-files-in-archive
– cutrightjm
Apr 27 '12 at 12:49




superuser.com/questions/216617/zip-linux-view-files-in-archive
– cutrightjm
Apr 27 '12 at 12:49












@ekaj less and unzip doesnt help me - it doesn't show me the size of files in the archive for example, or date&time of last modification (unless I'll decompress it somewhere to /tmp/AAA and then will run ls -la against /tmp/AAA - which is what I want to avoid).
– javagirl
May 1 '12 at 17:20




@ekaj less and unzip doesnt help me - it doesn't show me the size of files in the archive for example, or date&time of last modification (unless I'll decompress it somewhere to /tmp/AAA and then will run ls -la against /tmp/AAA - which is what I want to avoid).
– javagirl
May 1 '12 at 17:20












Don't unzip the .zip file, just open it. You can see the sizes and modification dates.
– cutrightjm
May 2 '12 at 12:06






Don't unzip the .zip file, just open it. You can see the sizes and modification dates.
– cutrightjm
May 2 '12 at 12:06














how can I open it in the linux server command line?
– javagirl
May 3 '12 at 15:34




how can I open it in the linux server command line?
– javagirl
May 3 '12 at 15:34












@javagirl: unzip -l does show you the size of files in the archive and date & time of last modification without unpacking the package. See my answer below. Actually, this is a duplicate as ekaj suggested.
– DevSolar
Jun 19 '12 at 11:53






@javagirl: unzip -l does show you the size of files in the archive and date & time of last modification without unpacking the package. See my answer below. Actually, this is a duplicate as ekaj suggested.
– DevSolar
Jun 19 '12 at 11:53












8 Answers
8






active

oldest

votes

















up vote
25
down vote













Use the jar tool that comes with the Java SDK for listing contents of a jar file. As described in http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html



$ jar tvf jarfile.jar





share|improve this answer




























    up vote
    8
    down vote













    Use vim to view and edit the contents of a jar file without extracting:



    Open the jar in vim like this:



    vim rabbitmq-client.jar


    You are presented with a list of files:



    1 " zip.vim version v22
    2 " Browsing zipfile /var/www/sandbox/eric/rabbitmq-client.jar
    3 " Select a file with cursor and press ENTER
    4
    5 META-INF/
    6 META-INF/MANIFEST.MF
    7 com/
    8 com/rabbitmq/
    9 com/rabbitmq/client/
    10 com/rabbitmq/client/impl/
    11 com/rabbitmq/client/impl/recovery/
    12 com/rabbitmq/tools/
    13 com/rabbitmq/tools/json/
    14 com/rabbitmq/tools/jsonrpc/
    15 com/rabbitmq/utility/


    Put the cursor over the META-INF/MANIFEST.MF and press Enter. You see this:



    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.8.2
    Created-By: 1.6.0_31-b31 (Sun Microsystems Inc.)
    Export-Package: com.rabbitmq.client;version="3.3.5";uses:="com.rabbitm
    q.client.impl,com.rabbitmq.utility,javax.net,javax.net.ssl,javax.secu
    rity.auth.callback,javax.security.sasl",com.rabbitmq.client.impl;vers
    ion="3.3.5";uses:="com.rabbitmq.client,com.rabbitmq.utility,javax.net
    ",com.rabbitmq.client.impl.recovery;version="3.3.5";uses:="com.rabbit
    mq.client,com.rabbitmq.client.impl",com.rabbitmq.tools;version="3.3.5
    ";uses:="com.rabbitmq.utility",com.rabbitmq.tools.json;version="3.3.5
    ",com.rabbitmq.tools.jsonrpc;version="3.3.5";uses:="com.rabbitmq.clie
    nt",com.rabbitmq.utility;version="3.3.5"
    Bundle-Vendor: SpringSource
    Bundle-Version: 3.3.5
    Tool: Bundlor 1.0.0.RELEASE
    Bundle-Name: RabbitMQ Java AMQP client library
    Bundle-ManifestVersion: 2
    Bundle-SymbolicName: com.rabbitmq.client
    Import-Package: javax.net;version="0",javax.net.ssl;version="0",javax.
    security.auth.callback;version="0",javax.security.sasl;version="0"

    Name: rabbitmq-client
    Specification-Title: AMQP
    Specification-Version: 0.9.1
    Specification-Vendor: AMQP Working Group (www.amqp.org)
    Implementation-Title: RabbitMQ
    Implementation-Version: 3.3.5
    Implementation-Vendor: Rabbit Technologies Ltd. (www.rabbitmq.com)


    Change a few lines using normal vim editing commands.



    press 'i' to enter insert mode
    edit your lines
    press :wq<enter> to write and quit


    You are taken back to a list of files in the jar, quit out.



    :q <enter>


    Check to see if it the changes are permanent:



    Follow the above steps again to inspect the file again, 
    the change should still be there.





    share|improve this answer





















    • Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
      – setevoy
      Jan 15 '16 at 20:02










    • why my jar file content showing binary file ?
      – John Joe
      Feb 13 '17 at 1:53










    • @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
      – DevSolar
      Nov 23 '17 at 8:20


















    up vote
    8
    down vote













    This one was always enough for me:



    unzip -l <jarfile>






    share|improve this answer






























      up vote
      2
      down vote













      I think .jar files are basically .zip files. So, I guess, fuse-zip could work.






      share|improve this answer

















      • 1




        This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
        – cutrightjm
        Apr 27 '12 at 20:00












      • I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
        – javagirl
        Apr 30 '12 at 9:29


















      up vote
      1
      down vote













      Just rename the .jar file to a .zip. IE, test.jar to test.zip. You will be able to see all of the compiled classes. If you want to view the source its self, however, you will need a decompiler.






      share|improve this answer





















      • sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
        – javagirl
        May 1 '12 at 17:16










      • @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
        – cutrightjm
        May 2 '12 at 12:06












      • if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
        – javagirl
        May 3 '12 at 15:34












      • Well, this is an alternative.
        – cutrightjm
        May 3 '12 at 16:05


















      up vote
      0
      down vote













      You could use an ssh mount to have server's file system locally. After it you can use any locally available software to navigate the file system, e.g. Far Manager is very powerful to navigate into archives.



      In this solution you don't need any additional software on the server, only sshd.






      share|improve this answer






























        up vote
        0
        down vote













        In case you wish to see the contents in date order as I did:



        jar tvf jarfile.{e,j,w}ar | sort -k 7,7 -k 3,3M -k 4,4n -k5,5






        share|improve this answer




























          up vote
          0
          down vote














          • To list the content: jar tvf jarfile.jar

          • To extract: jar xvf jarfile.jar






          share|improve this answer










          New contributor




          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
            – Anaksunaman
            Nov 21 at 12:38











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f417589%2flinux-what-is-a-most-convenient-way-to-see-the-content-of-jar-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          8 Answers
          8






          active

          oldest

          votes








          8 Answers
          8






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          25
          down vote













          Use the jar tool that comes with the Java SDK for listing contents of a jar file. As described in http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html



          $ jar tvf jarfile.jar





          share|improve this answer

























            up vote
            25
            down vote













            Use the jar tool that comes with the Java SDK for listing contents of a jar file. As described in http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html



            $ jar tvf jarfile.jar





            share|improve this answer























              up vote
              25
              down vote










              up vote
              25
              down vote









              Use the jar tool that comes with the Java SDK for listing contents of a jar file. As described in http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html



              $ jar tvf jarfile.jar





              share|improve this answer












              Use the jar tool that comes with the Java SDK for listing contents of a jar file. As described in http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html



              $ jar tvf jarfile.jar






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jun 15 '12 at 21:04









              nshah

              35123




              35123
























                  up vote
                  8
                  down vote













                  Use vim to view and edit the contents of a jar file without extracting:



                  Open the jar in vim like this:



                  vim rabbitmq-client.jar


                  You are presented with a list of files:



                  1 " zip.vim version v22
                  2 " Browsing zipfile /var/www/sandbox/eric/rabbitmq-client.jar
                  3 " Select a file with cursor and press ENTER
                  4
                  5 META-INF/
                  6 META-INF/MANIFEST.MF
                  7 com/
                  8 com/rabbitmq/
                  9 com/rabbitmq/client/
                  10 com/rabbitmq/client/impl/
                  11 com/rabbitmq/client/impl/recovery/
                  12 com/rabbitmq/tools/
                  13 com/rabbitmq/tools/json/
                  14 com/rabbitmq/tools/jsonrpc/
                  15 com/rabbitmq/utility/


                  Put the cursor over the META-INF/MANIFEST.MF and press Enter. You see this:



                  Manifest-Version: 1.0
                  Ant-Version: Apache Ant 1.8.2
                  Created-By: 1.6.0_31-b31 (Sun Microsystems Inc.)
                  Export-Package: com.rabbitmq.client;version="3.3.5";uses:="com.rabbitm
                  q.client.impl,com.rabbitmq.utility,javax.net,javax.net.ssl,javax.secu
                  rity.auth.callback,javax.security.sasl",com.rabbitmq.client.impl;vers
                  ion="3.3.5";uses:="com.rabbitmq.client,com.rabbitmq.utility,javax.net
                  ",com.rabbitmq.client.impl.recovery;version="3.3.5";uses:="com.rabbit
                  mq.client,com.rabbitmq.client.impl",com.rabbitmq.tools;version="3.3.5
                  ";uses:="com.rabbitmq.utility",com.rabbitmq.tools.json;version="3.3.5
                  ",com.rabbitmq.tools.jsonrpc;version="3.3.5";uses:="com.rabbitmq.clie
                  nt",com.rabbitmq.utility;version="3.3.5"
                  Bundle-Vendor: SpringSource
                  Bundle-Version: 3.3.5
                  Tool: Bundlor 1.0.0.RELEASE
                  Bundle-Name: RabbitMQ Java AMQP client library
                  Bundle-ManifestVersion: 2
                  Bundle-SymbolicName: com.rabbitmq.client
                  Import-Package: javax.net;version="0",javax.net.ssl;version="0",javax.
                  security.auth.callback;version="0",javax.security.sasl;version="0"

                  Name: rabbitmq-client
                  Specification-Title: AMQP
                  Specification-Version: 0.9.1
                  Specification-Vendor: AMQP Working Group (www.amqp.org)
                  Implementation-Title: RabbitMQ
                  Implementation-Version: 3.3.5
                  Implementation-Vendor: Rabbit Technologies Ltd. (www.rabbitmq.com)


                  Change a few lines using normal vim editing commands.



                  press 'i' to enter insert mode
                  edit your lines
                  press :wq<enter> to write and quit


                  You are taken back to a list of files in the jar, quit out.



                  :q <enter>


                  Check to see if it the changes are permanent:



                  Follow the above steps again to inspect the file again, 
                  the change should still be there.





                  share|improve this answer





















                  • Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
                    – setevoy
                    Jan 15 '16 at 20:02










                  • why my jar file content showing binary file ?
                    – John Joe
                    Feb 13 '17 at 1:53










                  • @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
                    – DevSolar
                    Nov 23 '17 at 8:20















                  up vote
                  8
                  down vote













                  Use vim to view and edit the contents of a jar file without extracting:



                  Open the jar in vim like this:



                  vim rabbitmq-client.jar


                  You are presented with a list of files:



                  1 " zip.vim version v22
                  2 " Browsing zipfile /var/www/sandbox/eric/rabbitmq-client.jar
                  3 " Select a file with cursor and press ENTER
                  4
                  5 META-INF/
                  6 META-INF/MANIFEST.MF
                  7 com/
                  8 com/rabbitmq/
                  9 com/rabbitmq/client/
                  10 com/rabbitmq/client/impl/
                  11 com/rabbitmq/client/impl/recovery/
                  12 com/rabbitmq/tools/
                  13 com/rabbitmq/tools/json/
                  14 com/rabbitmq/tools/jsonrpc/
                  15 com/rabbitmq/utility/


                  Put the cursor over the META-INF/MANIFEST.MF and press Enter. You see this:



                  Manifest-Version: 1.0
                  Ant-Version: Apache Ant 1.8.2
                  Created-By: 1.6.0_31-b31 (Sun Microsystems Inc.)
                  Export-Package: com.rabbitmq.client;version="3.3.5";uses:="com.rabbitm
                  q.client.impl,com.rabbitmq.utility,javax.net,javax.net.ssl,javax.secu
                  rity.auth.callback,javax.security.sasl",com.rabbitmq.client.impl;vers
                  ion="3.3.5";uses:="com.rabbitmq.client,com.rabbitmq.utility,javax.net
                  ",com.rabbitmq.client.impl.recovery;version="3.3.5";uses:="com.rabbit
                  mq.client,com.rabbitmq.client.impl",com.rabbitmq.tools;version="3.3.5
                  ";uses:="com.rabbitmq.utility",com.rabbitmq.tools.json;version="3.3.5
                  ",com.rabbitmq.tools.jsonrpc;version="3.3.5";uses:="com.rabbitmq.clie
                  nt",com.rabbitmq.utility;version="3.3.5"
                  Bundle-Vendor: SpringSource
                  Bundle-Version: 3.3.5
                  Tool: Bundlor 1.0.0.RELEASE
                  Bundle-Name: RabbitMQ Java AMQP client library
                  Bundle-ManifestVersion: 2
                  Bundle-SymbolicName: com.rabbitmq.client
                  Import-Package: javax.net;version="0",javax.net.ssl;version="0",javax.
                  security.auth.callback;version="0",javax.security.sasl;version="0"

                  Name: rabbitmq-client
                  Specification-Title: AMQP
                  Specification-Version: 0.9.1
                  Specification-Vendor: AMQP Working Group (www.amqp.org)
                  Implementation-Title: RabbitMQ
                  Implementation-Version: 3.3.5
                  Implementation-Vendor: Rabbit Technologies Ltd. (www.rabbitmq.com)


                  Change a few lines using normal vim editing commands.



                  press 'i' to enter insert mode
                  edit your lines
                  press :wq<enter> to write and quit


                  You are taken back to a list of files in the jar, quit out.



                  :q <enter>


                  Check to see if it the changes are permanent:



                  Follow the above steps again to inspect the file again, 
                  the change should still be there.





                  share|improve this answer





















                  • Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
                    – setevoy
                    Jan 15 '16 at 20:02










                  • why my jar file content showing binary file ?
                    – John Joe
                    Feb 13 '17 at 1:53










                  • @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
                    – DevSolar
                    Nov 23 '17 at 8:20













                  up vote
                  8
                  down vote










                  up vote
                  8
                  down vote









                  Use vim to view and edit the contents of a jar file without extracting:



                  Open the jar in vim like this:



                  vim rabbitmq-client.jar


                  You are presented with a list of files:



                  1 " zip.vim version v22
                  2 " Browsing zipfile /var/www/sandbox/eric/rabbitmq-client.jar
                  3 " Select a file with cursor and press ENTER
                  4
                  5 META-INF/
                  6 META-INF/MANIFEST.MF
                  7 com/
                  8 com/rabbitmq/
                  9 com/rabbitmq/client/
                  10 com/rabbitmq/client/impl/
                  11 com/rabbitmq/client/impl/recovery/
                  12 com/rabbitmq/tools/
                  13 com/rabbitmq/tools/json/
                  14 com/rabbitmq/tools/jsonrpc/
                  15 com/rabbitmq/utility/


                  Put the cursor over the META-INF/MANIFEST.MF and press Enter. You see this:



                  Manifest-Version: 1.0
                  Ant-Version: Apache Ant 1.8.2
                  Created-By: 1.6.0_31-b31 (Sun Microsystems Inc.)
                  Export-Package: com.rabbitmq.client;version="3.3.5";uses:="com.rabbitm
                  q.client.impl,com.rabbitmq.utility,javax.net,javax.net.ssl,javax.secu
                  rity.auth.callback,javax.security.sasl",com.rabbitmq.client.impl;vers
                  ion="3.3.5";uses:="com.rabbitmq.client,com.rabbitmq.utility,javax.net
                  ",com.rabbitmq.client.impl.recovery;version="3.3.5";uses:="com.rabbit
                  mq.client,com.rabbitmq.client.impl",com.rabbitmq.tools;version="3.3.5
                  ";uses:="com.rabbitmq.utility",com.rabbitmq.tools.json;version="3.3.5
                  ",com.rabbitmq.tools.jsonrpc;version="3.3.5";uses:="com.rabbitmq.clie
                  nt",com.rabbitmq.utility;version="3.3.5"
                  Bundle-Vendor: SpringSource
                  Bundle-Version: 3.3.5
                  Tool: Bundlor 1.0.0.RELEASE
                  Bundle-Name: RabbitMQ Java AMQP client library
                  Bundle-ManifestVersion: 2
                  Bundle-SymbolicName: com.rabbitmq.client
                  Import-Package: javax.net;version="0",javax.net.ssl;version="0",javax.
                  security.auth.callback;version="0",javax.security.sasl;version="0"

                  Name: rabbitmq-client
                  Specification-Title: AMQP
                  Specification-Version: 0.9.1
                  Specification-Vendor: AMQP Working Group (www.amqp.org)
                  Implementation-Title: RabbitMQ
                  Implementation-Version: 3.3.5
                  Implementation-Vendor: Rabbit Technologies Ltd. (www.rabbitmq.com)


                  Change a few lines using normal vim editing commands.



                  press 'i' to enter insert mode
                  edit your lines
                  press :wq<enter> to write and quit


                  You are taken back to a list of files in the jar, quit out.



                  :q <enter>


                  Check to see if it the changes are permanent:



                  Follow the above steps again to inspect the file again, 
                  the change should still be there.





                  share|improve this answer












                  Use vim to view and edit the contents of a jar file without extracting:



                  Open the jar in vim like this:



                  vim rabbitmq-client.jar


                  You are presented with a list of files:



                  1 " zip.vim version v22
                  2 " Browsing zipfile /var/www/sandbox/eric/rabbitmq-client.jar
                  3 " Select a file with cursor and press ENTER
                  4
                  5 META-INF/
                  6 META-INF/MANIFEST.MF
                  7 com/
                  8 com/rabbitmq/
                  9 com/rabbitmq/client/
                  10 com/rabbitmq/client/impl/
                  11 com/rabbitmq/client/impl/recovery/
                  12 com/rabbitmq/tools/
                  13 com/rabbitmq/tools/json/
                  14 com/rabbitmq/tools/jsonrpc/
                  15 com/rabbitmq/utility/


                  Put the cursor over the META-INF/MANIFEST.MF and press Enter. You see this:



                  Manifest-Version: 1.0
                  Ant-Version: Apache Ant 1.8.2
                  Created-By: 1.6.0_31-b31 (Sun Microsystems Inc.)
                  Export-Package: com.rabbitmq.client;version="3.3.5";uses:="com.rabbitm
                  q.client.impl,com.rabbitmq.utility,javax.net,javax.net.ssl,javax.secu
                  rity.auth.callback,javax.security.sasl",com.rabbitmq.client.impl;vers
                  ion="3.3.5";uses:="com.rabbitmq.client,com.rabbitmq.utility,javax.net
                  ",com.rabbitmq.client.impl.recovery;version="3.3.5";uses:="com.rabbit
                  mq.client,com.rabbitmq.client.impl",com.rabbitmq.tools;version="3.3.5
                  ";uses:="com.rabbitmq.utility",com.rabbitmq.tools.json;version="3.3.5
                  ",com.rabbitmq.tools.jsonrpc;version="3.3.5";uses:="com.rabbitmq.clie
                  nt",com.rabbitmq.utility;version="3.3.5"
                  Bundle-Vendor: SpringSource
                  Bundle-Version: 3.3.5
                  Tool: Bundlor 1.0.0.RELEASE
                  Bundle-Name: RabbitMQ Java AMQP client library
                  Bundle-ManifestVersion: 2
                  Bundle-SymbolicName: com.rabbitmq.client
                  Import-Package: javax.net;version="0",javax.net.ssl;version="0",javax.
                  security.auth.callback;version="0",javax.security.sasl;version="0"

                  Name: rabbitmq-client
                  Specification-Title: AMQP
                  Specification-Version: 0.9.1
                  Specification-Vendor: AMQP Working Group (www.amqp.org)
                  Implementation-Title: RabbitMQ
                  Implementation-Version: 3.3.5
                  Implementation-Vendor: Rabbit Technologies Ltd. (www.rabbitmq.com)


                  Change a few lines using normal vim editing commands.



                  press 'i' to enter insert mode
                  edit your lines
                  press :wq<enter> to write and quit


                  You are taken back to a list of files in the jar, quit out.



                  :q <enter>


                  Check to see if it the changes are permanent:



                  Follow the above steps again to inspect the file again, 
                  the change should still be there.






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 8 '14 at 19:52









                  Eric Leschinski

                  4,08843446




                  4,08843446












                  • Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
                    – setevoy
                    Jan 15 '16 at 20:02










                  • why my jar file content showing binary file ?
                    – John Joe
                    Feb 13 '17 at 1:53










                  • @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
                    – DevSolar
                    Nov 23 '17 at 8:20


















                  • Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
                    – setevoy
                    Jan 15 '16 at 20:02










                  • why my jar file content showing binary file ?
                    – John Joe
                    Feb 13 '17 at 1:53










                  • @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
                    – DevSolar
                    Nov 23 '17 at 8:20
















                  Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
                  – setevoy
                  Jan 15 '16 at 20:02




                  Great staff, thanks. Although right answer (as for me) is unzip - but that vim's example really appreciated.
                  – setevoy
                  Jan 15 '16 at 20:02












                  why my jar file content showing binary file ?
                  – John Joe
                  Feb 13 '17 at 1:53




                  why my jar file content showing binary file ?
                  – John Joe
                  Feb 13 '17 at 1:53












                  @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
                  – DevSolar
                  Nov 23 '17 at 8:20




                  @JohnJoe: Because your Vim does not identify it as a ZIP archive (which a .jar effectively is). This hints at a broken, or too-basic Vim setup. If that problem persists, consider taking it to vi.SE.
                  – DevSolar
                  Nov 23 '17 at 8:20










                  up vote
                  8
                  down vote













                  This one was always enough for me:



                  unzip -l <jarfile>






                  share|improve this answer



























                    up vote
                    8
                    down vote













                    This one was always enough for me:



                    unzip -l <jarfile>






                    share|improve this answer

























                      up vote
                      8
                      down vote










                      up vote
                      8
                      down vote









                      This one was always enough for me:



                      unzip -l <jarfile>






                      share|improve this answer














                      This one was always enough for me:



                      unzip -l <jarfile>







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Sep 9 '14 at 7:30

























                      answered Jun 15 '12 at 21:25









                      DevSolar

                      2,62051935




                      2,62051935






















                          up vote
                          2
                          down vote













                          I think .jar files are basically .zip files. So, I guess, fuse-zip could work.






                          share|improve this answer

















                          • 1




                            This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
                            – cutrightjm
                            Apr 27 '12 at 20:00












                          • I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
                            – javagirl
                            Apr 30 '12 at 9:29















                          up vote
                          2
                          down vote













                          I think .jar files are basically .zip files. So, I guess, fuse-zip could work.






                          share|improve this answer

















                          • 1




                            This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
                            – cutrightjm
                            Apr 27 '12 at 20:00












                          • I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
                            – javagirl
                            Apr 30 '12 at 9:29













                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          I think .jar files are basically .zip files. So, I guess, fuse-zip could work.






                          share|improve this answer












                          I think .jar files are basically .zip files. So, I guess, fuse-zip could work.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 27 '12 at 12:42









                          Der Hochstapler

                          66.9k48230282




                          66.9k48230282








                          • 1




                            This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
                            – cutrightjm
                            Apr 27 '12 at 20:00












                          • I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
                            – javagirl
                            Apr 30 '12 at 9:29














                          • 1




                            This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
                            – cutrightjm
                            Apr 27 '12 at 20:00












                          • I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
                            – javagirl
                            Apr 30 '12 at 9:29








                          1




                          1




                          This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
                          – cutrightjm
                          Apr 27 '12 at 20:00






                          This is the answer I would go with if you actually want to navigate to the .zip archive like a folder. (or at least that is how I understood that it works)
                          – cutrightjm
                          Apr 27 '12 at 20:00














                          I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
                          – javagirl
                          Apr 30 '12 at 9:29




                          I can't install additional stuff to server, unless I wouldn't ask this question just by installing MC
                          – javagirl
                          Apr 30 '12 at 9:29










                          up vote
                          1
                          down vote













                          Just rename the .jar file to a .zip. IE, test.jar to test.zip. You will be able to see all of the compiled classes. If you want to view the source its self, however, you will need a decompiler.






                          share|improve this answer





















                          • sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
                            – javagirl
                            May 1 '12 at 17:16










                          • @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
                            – cutrightjm
                            May 2 '12 at 12:06












                          • if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
                            – javagirl
                            May 3 '12 at 15:34












                          • Well, this is an alternative.
                            – cutrightjm
                            May 3 '12 at 16:05















                          up vote
                          1
                          down vote













                          Just rename the .jar file to a .zip. IE, test.jar to test.zip. You will be able to see all of the compiled classes. If you want to view the source its self, however, you will need a decompiler.






                          share|improve this answer





















                          • sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
                            – javagirl
                            May 1 '12 at 17:16










                          • @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
                            – cutrightjm
                            May 2 '12 at 12:06












                          • if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
                            – javagirl
                            May 3 '12 at 15:34












                          • Well, this is an alternative.
                            – cutrightjm
                            May 3 '12 at 16:05













                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          Just rename the .jar file to a .zip. IE, test.jar to test.zip. You will be able to see all of the compiled classes. If you want to view the source its self, however, you will need a decompiler.






                          share|improve this answer












                          Just rename the .jar file to a .zip. IE, test.jar to test.zip. You will be able to see all of the compiled classes. If you want to view the source its self, however, you will need a decompiler.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 27 '12 at 12:46









                          cutrightjm

                          3,35532047




                          3,35532047












                          • sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
                            – javagirl
                            May 1 '12 at 17:16










                          • @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
                            – cutrightjm
                            May 2 '12 at 12:06












                          • if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
                            – javagirl
                            May 3 '12 at 15:34












                          • Well, this is an alternative.
                            – cutrightjm
                            May 3 '12 at 16:05


















                          • sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
                            – javagirl
                            May 1 '12 at 17:16










                          • @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
                            – cutrightjm
                            May 2 '12 at 12:06












                          • if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
                            – javagirl
                            May 3 '12 at 15:34












                          • Well, this is an alternative.
                            – cutrightjm
                            May 3 '12 at 16:05
















                          sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
                          – javagirl
                          May 1 '12 at 17:16




                          sorry, i didn't get it. what is the difference? i still cannot do ls, cd command against *.zip file.
                          – javagirl
                          May 1 '12 at 17:16












                          @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
                          – cutrightjm
                          May 2 '12 at 12:06






                          @javagirl You can only open .zip files, as far as I know, by clicking on them if you are not going to install any additional software. IE, you aren't going to cd to them because they are not directories.
                          – cutrightjm
                          May 2 '12 at 12:06














                          if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
                          – javagirl
                          May 3 '12 at 15:34






                          if you'd use 'mc' in linux you would knew that you can browse over content of zip/jar file, because it makes unzipping on fly. My question was about the alternative to 'mc', because I heard a lot of linux guru saying they can avoid 'mc' and use pure command line with the same result and efficiency. And I cannot 'clicking' on zip file as far as I'm on the linux server command line
                          – javagirl
                          May 3 '12 at 15:34














                          Well, this is an alternative.
                          – cutrightjm
                          May 3 '12 at 16:05




                          Well, this is an alternative.
                          – cutrightjm
                          May 3 '12 at 16:05










                          up vote
                          0
                          down vote













                          You could use an ssh mount to have server's file system locally. After it you can use any locally available software to navigate the file system, e.g. Far Manager is very powerful to navigate into archives.



                          In this solution you don't need any additional software on the server, only sshd.






                          share|improve this answer



























                            up vote
                            0
                            down vote













                            You could use an ssh mount to have server's file system locally. After it you can use any locally available software to navigate the file system, e.g. Far Manager is very powerful to navigate into archives.



                            In this solution you don't need any additional software on the server, only sshd.






                            share|improve this answer

























                              up vote
                              0
                              down vote










                              up vote
                              0
                              down vote









                              You could use an ssh mount to have server's file system locally. After it you can use any locally available software to navigate the file system, e.g. Far Manager is very powerful to navigate into archives.



                              In this solution you don't need any additional software on the server, only sshd.






                              share|improve this answer














                              You could use an ssh mount to have server's file system locally. After it you can use any locally available software to navigate the file system, e.g. Far Manager is very powerful to navigate into archives.



                              In this solution you don't need any additional software on the server, only sshd.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Mar 20 '17 at 10:17









                              Community

                              1




                              1










                              answered Jun 13 '12 at 9:23









                              kan

                              1137




                              1137






















                                  up vote
                                  0
                                  down vote













                                  In case you wish to see the contents in date order as I did:



                                  jar tvf jarfile.{e,j,w}ar | sort -k 7,7 -k 3,3M -k 4,4n -k5,5






                                  share|improve this answer

























                                    up vote
                                    0
                                    down vote













                                    In case you wish to see the contents in date order as I did:



                                    jar tvf jarfile.{e,j,w}ar | sort -k 7,7 -k 3,3M -k 4,4n -k5,5






                                    share|improve this answer























                                      up vote
                                      0
                                      down vote










                                      up vote
                                      0
                                      down vote









                                      In case you wish to see the contents in date order as I did:



                                      jar tvf jarfile.{e,j,w}ar | sort -k 7,7 -k 3,3M -k 4,4n -k5,5






                                      share|improve this answer












                                      In case you wish to see the contents in date order as I did:



                                      jar tvf jarfile.{e,j,w}ar | sort -k 7,7 -k 3,3M -k 4,4n -k5,5







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Oct 9 '15 at 10:46









                                      JStrahl

                                      1313




                                      1313






















                                          up vote
                                          0
                                          down vote














                                          • To list the content: jar tvf jarfile.jar

                                          • To extract: jar xvf jarfile.jar






                                          share|improve this answer










                                          New contributor




                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.


















                                          • This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
                                            – Anaksunaman
                                            Nov 21 at 12:38















                                          up vote
                                          0
                                          down vote














                                          • To list the content: jar tvf jarfile.jar

                                          • To extract: jar xvf jarfile.jar






                                          share|improve this answer










                                          New contributor




                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.


















                                          • This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
                                            – Anaksunaman
                                            Nov 21 at 12:38













                                          up vote
                                          0
                                          down vote










                                          up vote
                                          0
                                          down vote










                                          • To list the content: jar tvf jarfile.jar

                                          • To extract: jar xvf jarfile.jar






                                          share|improve this answer










                                          New contributor




                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.










                                          • To list the content: jar tvf jarfile.jar

                                          • To extract: jar xvf jarfile.jar







                                          share|improve this answer










                                          New contributor




                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.









                                          share|improve this answer



                                          share|improve this answer








                                          edited Nov 21 at 12:15





















                                          New contributor




                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.









                                          answered Nov 21 at 10:38









                                          Athi

                                          11




                                          11




                                          New contributor




                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.





                                          New contributor





                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.






                                          Athi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.












                                          • This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
                                            – Anaksunaman
                                            Nov 21 at 12:38


















                                          • This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
                                            – Anaksunaman
                                            Nov 21 at 12:38
















                                          This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
                                          – Anaksunaman
                                          Nov 21 at 12:38




                                          This seems to be potentially a good answer but you should try to make it "beefier". Answer(s) that can fit into one or two lines are often typically better off as comments (once you have enough rep).
                                          – Anaksunaman
                                          Nov 21 at 12:38


















                                           

                                          draft saved


                                          draft discarded



















































                                           


                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f417589%2flinux-what-is-a-most-convenient-way-to-see-the-content-of-jar-file%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                          Mangá

                                          Eduardo VII do Reino Unido