How do I turn a folder into a JAR file?

Discuss application theming and theme development.
User avatar
IE_User_Forever
Posts: 56
Joined: April 10th, 2007, 10:26 pm

Post by IE_User_Forever »

chrome.manifest file? I have the install RDF and contents RDF
- I gotta go to bed...
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Post by smsmith »

^It's just another way of doing things. The install.rdf and contents.rdf file are a fine way of doing it.

When you ZIP the folder, be INSIDE the folder, select all the contents inside the folder, then ZIP it. Rename that ZIP to the JAR.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
steviex
Moderator
Posts: 28902
Joined: August 12th, 2006, 8:27 am
Location: Middle England

Post by steviex »

Have a look at the sticky at the top of this forum by ehume. He provides a step by step guide to how to do this.
IZarc is another good little program for Archiving files... Also free.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -Albert Einstein

Please DO NOT PM me for support... Lets keep it on the board, so we can all learn.
Old Greg S
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Greg S »

If you are using winXP and also have within the Folder Options, this option unchecked "Hide extensions for know file types", then all you have to do is right click desktop or within your themes directory and select "New -> Compressed (zipped) Folder as YourTheme.zip. Select all your files then drag n drop into your YourTheme.zip, rename YourTheme.zip to YourTheme.jar. If the option mentioned above is checked and you do this you will probably end up with something like YourTheme.zip.zip which won't work. You can also use the zip progs mentioned by others but be sure after zipping that the prog didn't add your contents in a folder inside of the zip as in YourTheme.zip -> Folder(named YourTheme.zip) -> contents. It should be YourTheme.zip -> contents
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

Two points:

1. You can set up IZarc to output jarfiles directly. This will save you the step of converting a zipfile to a jarfile.

2. If you select the My_Theme directory and zip it, you will get a zipfile that is named My_Theme.zip but which contains a My_Theme directory. This additional directory layer will make your theme unusable in Firefox. You must go inside the My_Theme directory, select everything inside it, and then make your zipfile. The result will be a My_Theme.zip file with the correct structure, one that Firefox can use.
Firefox: Sic transit gloria mundi.
User avatar
IE_User_Forever
Posts: 56
Joined: April 10th, 2007, 10:26 pm

Post by IE_User_Forever »

I see why it says not a valid install package. I skipped that part.
User avatar
IE_User_Forever
Posts: 56
Joined: April 10th, 2007, 10:26 pm

Post by IE_User_Forever »

I am editing the macfoxII theme (I think) and this is what the install package looks like: <xml>

<RDF>

<Description>
<em>{Themes_UUID}</em>
<em>Themes_Version</em>

<Target>

<em>
<Description>
<!-- Firefox's UUID -->
<em>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em>
<em>Min_FF_Version</em>
<em>Max_FF_Version</em>
</Description>
</em>

<Front>
<em>macfoxII</em>
<em>OSX My_Theme</em>
<em>Kelly Cunningham</em>
<em>copyright (c) Kelly Cunningham</em>
<em>http://www.webether.com</em>

<!--
<em>http://www.webether.com/macfoxII/update/macfoxII.jar</em>
<em>http://www.webether.com/macfoxII</em>
-->

<Front>
<em>macfoxII</em>
</Description>

</RDF>

What is the invalid part?
Post Reply