JARs not extracting

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.
Please direct questions that are Mac or Linux-specific (dealing with installation and OS integration) to the appropriate Linux or Mac board.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only. The main focus here is on Pale Moon on Windows. Please direct your questions that are specific for Linux and Mac to the dedicated boards for those operating systems.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Locked
glauberyt

JARs not extracting

Post by glauberyt » 2012-03-24, 11:01

Hello,
I have a question: why I can't unpack any (except for pippki) jar's in PM?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-03-24, 11:49

Maybe your unzip program is faulty? They are just regular .jar files packed with the zip compression library.

Question though: why would you want to, in the first place? Just curious...
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

glauberyt

Re: JARs not extracting

Post by glauberyt » 2012-04-02, 17:38

Rather not faulty - I mean please, not faulty, because I have been using it for years now, without a single hickup.
It is 7zip 9.20 on win.

I don't even have a proper header on Your files (except for pippki). Yes, I checked it several times - for PM 8, 9 (x64 and 32) and 11 for x64. So what can be wrong?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-04-02, 17:46

The jars are packed with an industry standard command-line packer (infozip) as part of the build process. They do have a proper zip header and open fine in any archive manager, including 7-zip 9.20 (which I use very regularly myself). The jar opens fine when choosing "open inside" (to prevent Java from launching it) and can be easily extracted. No errors, no problems.

So unless you have something interfering with your file system or file access, there is no reason why you should not be able to open or unpack them. Do you have "security" software installed that could possibly interfere with .jar files, real-time on-access scanners that include specific Java security?
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
satrow
Forum staff
Forum staff
Posts: 1851
Joined: 2011-09-08, 11:27

Re: JARs not extracting

Post by satrow » 2012-04-02, 18:35

7-zip does have some quirks, try using Winrar for .jar's. http://www.rarlab.com/download.htm

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-04-02, 18:48

I extracted it without problems with 7-zip, Cym. there's something else going on for them.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

glauberyt

Re: JARs not extracting

Post by glauberyt » 2012-04-02, 19:43

WOW it works in 11.0.1-x64 ! THX everyone!

User avatar
satrow
Forum staff
Forum staff
Posts: 1851
Joined: 2011-09-08, 11:27

Re: JARs not extracting

Post by satrow » 2012-04-02, 19:48

@ glauberyt: what works exactly?

I've seen times when 7-zip asks permission to overwrite files when using Extract from the right-click menu. I've since removed that option and use Winrar instead, even though 7-zip is still the default for opening the majority of compessed files. It might be related to the below screen grab, same file opened in both:
7zipWinrar.jpg

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-04-02, 20:19

Cymroly -- Seems you're using "flat view"? Because that would display it like that. (I find it an odd mode I'd probably never use, having the path at the far right and showing all files in the archive in a root list...).

i.e.: that's not an error and nothing wrong with the file manager.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
satrow
Forum staff
Forum staff
Posts: 1851
Joined: 2011-09-08, 11:27

Re: JARs not extracting

Post by satrow » 2012-04-03, 13:32

Seems that I had parts of an earlier version of 7-zip installed, a cleanout and reinstall of the latest version has cleared things up, also fixed the "7-zip asks permission to overwrite files when using Extract from the right-click menu" too.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-04-03, 13:41

Seriously though, I don't think my original question was answered - apart from having some odd error for the original poster with his 7-zip... why would you want to extract files from the .jar archives to begin with?
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-05-11, 12:16

UPDATE: It is very possible that the OP tried to use the command-line 7-zip with wildcards. This isn't properly supported because the .jars in question have been run through a jar optimizer that removes duplicates and adjusts the archive index accordingly. This results in different index entries pointing to the same content in the archive's datastore instead of having duplicate blobs in there. Not using wildcards and telling the archiver to extract one file at a time (as passed from/done by many GUI shells) will correctly pull the content of the single file out of the archive.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

glauberyt

Re: JARs not extracting

Post by glauberyt » 2012-06-29, 17:22

Can you tell "how to" optimize the JAR and how to extract JARs from PM installer / ZIP, because I couldn't do it with my (well, limited to be honest) knowledge.

My sums of browser.jar of browser.jar from x64 version of ZIP PM's distribution:
SHA256
0b06e5ea9f61aad7e2f814ac56d50c67eb5a7edb0ebaa86e0730b8b98c9f4ab8

MD5
afce7832a2602fb68cf9bbdc0366154f

SHA
ac466a653ceae237b369d464401c12068998622e

CRC:
7aac14ff

File header: C4 0C 15 00 50 4B 01 02 14 00 14 00 00 00 00 00

Frankly, I hate when optimizers / whatever corrupts file headers, which is fine for most of the time, but not in my case (I am using still the same 7zip).

-- EDIT: header

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29203
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: JARs not extracting

Post by Moonchild » 2012-06-29, 20:11

Sorry but I still don't see why you would want to unpack the JARs anyway. Care to answer that question?

If you use a GUI unpacker that doesn't use wildcards there is no problem extracting all of the files as far as I can tell. Which is a bonus considering you should consider them part of the binary package that isn't intended to be pulled apart, reverse-engineered or otherwise hacked. There is no need to do this considering any and all changes to the functionality of the scripts contained in it can be achieved by writing add-ons.

Posting checksums or the header in hex serves no purpose, the .jar files are as-intended and they are not corrupt.

EDIT: if you want to know what exactly is done with the jars when packed as part of packaging in Pale Moon, have a look at optimizejars.py in the Pale Moon source. You can find this script in \config under the source root.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

Locked