![]() Packaging and sharing your projectsAn effective way of sharing your applications with your collaborators is preparing self-running jar files. How to prepare such files using psychWithJava is outlined below using the HelloPsychophysicist example. A more complete discussion can be found at http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html and at http://java.sun.com/docs/books/tutorial/deployment/jar/index.html. (Note: to run the example jar files you don't need to install the psychWithJava package.)Creating JAR files with command line toolsjar xvf <full_path_to_psychWithJava> psychWithJava/ <full_path_to_psychWithJava> is the full path to the psychWithJava package as explained here (For example /home/boyaci/javaClasses/psychWithJava.jar on Linux, or /Users/boyaci/javaClasses/psychWithJava.jar on Mac OS X.) This will create psychWithJava/FullScreen.class file.
Manifest-Version: 1.0 Main-Class: HelloPsychophysicist Main-Class indicates the name of the class that has the main method in your project. If you haven't yet built your project, see Building and running java projects here.
jar -cvfm HelloPsychophysicist.jar manifest.mf HelloPsychophysicist.class psychWithJava/*.class *.png Creating JAR files with Eclipse
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size
![]() This image is altered to fit the page. Click on the image to see it in its actual size Running JAR filesOnce the self-running jar file is created, you can deploy it either by a mouse click or double on the file on your hard drive (this may work even if the file is on a web page), or manually from a terminal (MS-DOS prompt) by typingjava -jar HelloPsychophysicist.jar |