Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting processing to a jar file

I've been working on a processing application using ControlP5 and Twitter4j. I want to have my project run from a single jar file from any operating system. Basically I want to package up my application. My application uses images. I've been browsing for more than an hour, but I cant find how to do this. Any suggestions?

using processing 2 twitter4j3

Thanks in advance!

like image 733
Pro-grammer Avatar asked Jul 25 '26 14:07

Pro-grammer


2 Answers

I dont know if you can directly do it from the Processing IDE however, if export your sketch to a Java applet then locate the .java the the sketch folder you can use this in conjunction with Eclipse to export to a jar file.

like image 158
CatsLoveJazz Avatar answered Jul 28 '26 03:07

CatsLoveJazz


So, I know that this post is very old but if you are still looking for a solution, or to other people that see this thread, it's relatively simple.

  1. Export the project
  2. In the folder with the exported project (something like application.windows64), navigate to lib and find core.jar and project name.jar (you need to have file name extensions visible)
  3. Rename the files to .zip files
  4. Extract core.jar to whatever folder
  5. Extract project name.jar into the same folder (make sure you don't do it into a subfolder)
  6. Click yes if it asks if it wants you to replace a file (if it doesn't you extracted the files incorrectly)
  7. Delete core.jar and project name.jar
  8. If the project uses images, move them into the same folder as all the other files
  9. Select all of the files in the folder, right click, hover over send to and select compressed (zipped) folder
  10. Rename the .zip file to name of project.jar
like image 24
Pi Studios Avatar answered Jul 28 '26 05:07

Pi Studios



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!