Extracting .jar file with command line

后端 未结 8 781
悲哀的现实
悲哀的现实 2020-12-04 07:52

I am trying to extract the files from a .jar file. How do I do that using command line?

I am running Windows 7

相关标签:
8条回答
  • 2020-12-04 08:44

    Given a file named Me.Jar:

    1. Go to cmd
    2. Hit Enter
    3. Use the Java jar command -- I am using jdk1.8.0_31 so I would type

      C:\Program Files (x86)\Java\jdk1.8.0_31\bin\jar xf me.jar

    That should extract the file to the folder bin. Look for the file .class in my case my Me.jar contains a Valentine.class

    Type java Valentine and press Enter and your message file will be opened.

    0 讨论(0)
  • 2020-12-04 08:49

    To extract the jar into specified folder use this command via command prompt

    C:\Java> jar xf myFile.jar -C "C:\tempfolder"
    
    0 讨论(0)
提交回复
热议问题