---
title: 'Compressing Files within Eclipse on OSX'
url: 'https://stevenjaycohen.com/journal/compressing-files-within-eclipse-on-osx'
markdown: 'https://stevenjaycohen.com/journal/compressing-files-within-eclipse-on-osx.md'
date: '2012-01-18'
description: 'I work in Eclipse nearly every day, and I can’t begin to tell you how many times I have needed to compress a folder or project for one reason or another. Since tools like Zip and Tar are part of OSX, it is pretty easy to configure Eclipse to package the files for me. Click on the External Tools Co…'
taxonomy:
  category:
    - Journal
  tag:
    - eclipse
    - 'os x'
    - software
---

# Compressing Files within Eclipse on OSX

## [Compressing Files within Eclipse on OSX](https://stevenjaycohen.com/journal/compressing-files-within-eclipse-on-osx)

    18th Jan 2012   [eclipse](https://stevenjaycohen.com/tag:eclipse#body-wrapper) [os x](https://stevenjaycohen.com/tag:os%20x#body-wrapper) [software](https://stevenjaycohen.com/tag:software#body-wrapper)  

I work in [Eclipse](https://www.eclipse.org "Eclipse (software)") nearly every day, and I can’t begin to tell you how many times I have needed to compress a folder or project for one reason or another. Since tools like Zip and [Tar](https://en.wikipedia.org/wiki/Tar_(computing) "Tar (computing)") are part of [OSX](https://www.apple.com/osx "OS X"), it is pretty easy to configure Eclipse to package the [files](https://en.wikipedia.org/wiki/Computer_file "Computer file") for me.

[![Screen_Shot_2012-01-18_at_1_59_21_PM](https://stevenjaycohen.com/user/pages/files/2014/03/screen_shot_2012-01-18_at_1_59_21_pm.png)](https://stevenjaycohen.com/files/2014/03/screen_shot_2012-01-18_at_1_59_21_pm.png?ssl=1)

Click on the External Tools Configurations (in the menu shown) and add a New Launch [Configuration](https://en.wikipedia.org/wiki/Configuration_file "Configuration file") (I named mine [ZIP](https://en.wikipedia.org/wiki/Zip_(file_format) "Zip (file format)")). Enter the location as `/usr/bin/zip`, the [Working Directory](https://en.wikipedia.org/wiki/Working_directory "Working directory") as `${container_loc}` and the Arguments as `-r ${selected_resource_name}.zip ${selected_resource_name}`.

[![Screen_Shot_2012-01-18_at_1_59_59_PM](https://stevenjaycohen.com/user/pages/files/2014/03/screen_shot_2012-01-18_at_1_59_59_pm.png)](https://stevenjaycohen.com/files/2014/03/screen_shot_2012-01-18_at_1_59_59_pm.png?ssl=1)

On the Refresh tab, check `Refresh resources upon completion`. Set it to `The entire workspace` or `The project containing the selected resource`. And check `Recursively include sub-folders`.

[![Screen_Shot_2012-01-18_at_2_00_29_PM](https://stevenjaycohen.com/user/pages/files/2014/03/screen_shot_2012-01-18_at_2_00_29_pm.png)](https://stevenjaycohen.com/files/2014/03/screen_shot_2012-01-18_at_2_00_29_pm.png?ssl=1)

On the Build tab, check `Build before launch` and select either `The entire workspace` or `The project containing the selected resource`.

[![Screen_Shot_2012-01-18_at_2_00_42_PM](https://stevenjaycohen.com/user/pages/files/2014/03/screen_shot_2012-01-18_at_2_00_42_pm.png)](https://stevenjaycohen.com/files/2014/03/screen_shot_2012-01-18_at_2_00_42_pm.png?ssl=1)

Skip the [Environment](https://en.wikipedia.org/wiki/Environment_variable "Environment variable") tab and go straight to the [Common](https://web.archive.org/web/20160802035125/https://www.thinkcommon.com:80/ "Common (entertainer)") tab. Here select `Local file`, `Allocate console (necessary for input)`, and `Launch in background`. You can also `Display in favorites menu` to get the entry shown in the first image.

[![Screen_Shot_2012-01-18_at_2_00_54_PM](https://stevenjaycohen.com/user/pages/files/2014/03/screen_shot_2012-01-18_at_2_00_54_pm.png)](https://stevenjaycohen.com/files/2014/03/screen_shot_2012-01-18_at_2_00_54_pm.png?ssl=1)

Now, you should be able to click on any folder in your Package Explorer, select ZIP from the menu, see the console give you feedback about what is happening, generate a zip file, and refresh the view to show the new file, all in one click!

 [ Previous Post](https://stevenjaycohen.com/journal/gwt-web-developer-plugins-break-after-browser-upgrades-the-omniweb-solution) [Next Post ](https://stevenjaycohen.com/journal/gasp-reborn-gwt-drupal)

---

## Navigation

- Parent: [My Journal](https://stevenjaycohen.com/journal.md)
- Previous: [GaSP reborn? #GWT #Drupal](https://stevenjaycohen.com/journal/gasp-reborn-gwt-drupal.md)
- Next: [#GWT Web Developer Plugins break after browser upgrades - The #OmniWeb solution](https://stevenjaycohen.com/journal/gwt-web-developer-plugins-break-after-browser-upgrades-the-omniweb-solution.md)
