# Export sketch to jar

**URL:** https://discourse.processing.org/t/export-sketch-to-jar/8147
**Category:** Processing
**Created:** [February 6, 2019, 2:50am UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147 "2019-02-06T02:50:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)
#### Post date: [February 6, 2019, 2:50am UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147/1 "2019-02-06T02:50:30Z")

</div>

Is it possible to export a processing sketch as a jar, or to turn the exported files into an executable jar? I tried following the instructions here [https://forum.processing.org/one/topic/getting-processing-to-export-as-a-executable-jar#25080000001605035.html](https://forum.processing.org/one/topic/getting-processing-to-export-as-a-executable-jar#25080000001605035.html), but when I tried to open the jar, it said the file was corrupt.

---

<div class="post-metadata">

### Author: ![lqdev](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lqdev/32/29_2.png) [@lqdev](https://discourse.processing.org/u/lqdev)
#### Post date: [February 6, 2019, 10:47am UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147/2 "2019-02-06T10:47:57Z")

</div>

You can still use `Export Application` and export it for any single platform. I haven’t used Processing for a while, but from my Java knowledge I can tell that if you unpack all the files from the JARs in the `application.(platform)/lib` folder into a single directory, and then pack all those files into a JAR file, the end result is likely to work like that. I never peeked into a Processing-generated JAR, so I’m not sure if it contains the `META-INF/MANIFEST.MF` file, which is required to run your application using a double-click (or `java -jar` from the CLI).

---

<div class="post-metadata">

### Author: ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)
#### Post date: [February 6, 2019, 2:29pm UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147/3 "2019-02-06T14:29:56Z")

</div>

I try that, and I get this error:

![error](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/d98c81e7d0f2eaea9c9197c3efbf4e07040bb64e.png)

---

<div class="post-metadata">

### Author: ![lqdev](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lqdev/32/29_2.png) [@lqdev](https://discourse.processing.org/u/lqdev)
#### Post date: [February 6, 2019, 10:14pm UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147/4 "2019-02-06T22:14:46Z")

</div>

What’s the folder structure of your final JAR file?

---

<div class="post-metadata">

### Author: ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)
#### Post date: [February 7, 2019, 12:30am UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147/5 "2019-02-07T00:30:14Z")

</div>

When I was opening the jar to check, I found the issue. I compressed the entire folder, so the jar contained a folder with all of the files inside, instead of just the files. Thanks for your help!
