This Tutorial is currently being written. Please come back later for a final version.
Goals
Required Environment
Download and install FatJar Eclipse PluginFatJar is a Plugin for the Eclipse Java IDE which bundles a complete java application (including all required libraries) into one java archive file (.jar file). Download Fat Jar Plugin here. Unzip the downloaded Fat Jar zip file and copy the content of the zip file's plugin folder into eclipse at [YourEclipseLocation]/plugins. After copying the jar file, close your eclipse (if running). Start eclipse with option -clean from the command line: eclipse -clean Otherwise, Eclipse will not find the Fat Jar Plugin. This has to be performed only once after installation. If installation was successful, a "Build Fat Jar" item should appear in the context menu, when you right click on your MT4j project: Download and install JSmooth .exe WrapperDownload and install http://jsmooth.sourceforge.net/download.php. Follow installation instructions of JSmooth. Bunlde application and libraries with Fat Jar pluginTo create an executable .jar file, we right click on the MT4j project in eclipse and click on the "Build Fat Jar" item in the context menu. The next step is to choose the main class that shall be run when executing the .jar file. In this example, we select the TouchTail example from the examples included in MT4j. Then, we create a folder with the name "distribution" and select it as export target by changing Jar-Name to "distribution\TouchTails.jar". For further information on Fat Jar, you can have a look at the Fat Jar Tutorial. After that we click finish and the file TouchTails.jar is created in the distribution folder by the Fat Jar Plugin. Now, we copy all files from our MT4j folder to our distribution folder. This includes required files like .dlls or the MT4j settings in Settings.txt. Create a windows executable with JSmoothHaving bundled all libraries and our MT4j application in one jar file makes it much easier to configure JSmooth. |