== Semi-Stable Version == The latest semi-stable version is always here: http://josm.openstreetmap.de/download/josm-tested.jar - we don't call it a "release" because while it is more robust than the nightly build, it doesn't usually run through as many checks as a release would. It is updated approximately once a week. == Nightly Builds == You can always grab the latest nightly build from http://josm.openstreetmap.de/download/josm-latest.jar. Many users actually use this for their daily work. == Running == === Microsoft Windows === Double click on the jar file. If this does not work, you probably need to install the [http://java.com/download/index.jsp Java Runtime] In more extensive edit sessions, you may get an "out of memory" error. To avoid this, the assigned memory can be increased.[[BR]] Create a shortcut like in the following example: {{{ C:\WINNT\system32\java.exe -jar -Xmx512M "C:\PATH-TO-JOSM\josm-latest.jar" }}} === Linux / *BSD === '''using the shell''':: Go to the directory where the josm-latest.jar is and type {{{ #!sh java -jar josm-latest.jar }}} to launch. Replace `''josm-latest.jar''` with the name of the jar file you loaded, e.G. `josm.jar` for releases. If this doesn't help, try to set you JAVA_HOME variable to the java location (the root location, not the bin. As example: {{{ #!sh export JAVA_HOME=/usr/lib/sun-j2se5.0-jdk java -jar ''josm.jar'' }}} '''KDE''':: There is a [http://josm.openstreetmap.de/download/tutorials/setting_up_kde.avi tutorial] on how to setup your environment to start jar-files by clicking on them. '''GNOME''':: Right click on the JAR file, and select __O__pen with "Sun Java 5.0 Runtime", or whatever java version you have. '''XGL/Compiz''':: Type this into a shell: {{{ #!sh export AWT_TOOLKIT=MToolkit && java -jar josm-test.jar }}} as described here: http://kubasik.net/blog/index.php/2006/06/19/java-sun-150-and-xglcompiz-on-ubuntu/ === MacOS === 1.) If you have downloaded "josm-latest.jar" you can start JOSM by clicking on the josm-latest.jar file in the MacOS Finder (you might get the warning that you are about to open a file from the internet - just accept). This way to start JOSM should be sufficient in most cases. 2.) However, if you need to start it up with additional Java parameter(s) (e.g. -Xmx512M) you can also use the MacOS "Terminal" and start JOSM (Java) manually: Start the "Terminal" application (e.g. by typing "Terminal" into the Spotlight search) Now you have two options: a.) type in the following command and press "Enter" to start JOSM without any special java options (simply starts up JOSM like under point 1): {{{ java -jar FOLDER/josm-latest.jar }}} Whereas "FOLDER" should be replaced by the name of the folder you have josm-latest.jar downloaded to. If you have downloaded it to the standard MacOS "Download" Folder it would look like: {{{ java -jar Download/josm-latest.jar }}} b.) to use additional java options just add them right after "java" If you for example have experienced the "Out of memory" warning (e.g. trying to load geo-tagged photos to JOSM) you would start JOSM like this: {{{ java -Xmx256M -jar FOLDER/josm-latest.jar }}} This would allow JOSM to use up to 256 MB of RAM (memory). The java option "-Xmx256M" set's the maximum Java heap size to 265 MB. You are free to replace -Xmx256M by any number appropriate for your system (e.g. -Xmx512M or even -Xmx1024M). By the way. To get an overview of all Java start options you can type in: {{{ java -help }}} == Getting the Source == JOSM is available under GPL, and so of course you can get the sources and compile, modify or redistribute it by yourself. You can grab the sources via [http://subversion.tigris.org subversion] svn co http://josm.openstreetmap.de/svn/trunk josm Or you can inspect single files over the web frontend at http://josm.openstreetmap.de/svn. == Compiling == === Using ant === The easiest way to compile JOSM provided Java on your machine is properly set up is to go to the josm directory and type: {{{ ant }}} That will create a `dist/josm-custom.jar` file if successful. === Using eclipse === Use eclipse and the provided `.project` and `.classpath` file. Just add a new Java Project using the JOSM source folder as existing path. If you try to compile the JOSM sources in Eclipse and get errors like "The method marktr(String) is undefined for the type SomeType" look at [http://lists.openstreetmap.org/pipermail/josm-dev/2008-August/001585.html solution suggested at mailing list]. There are also two Videos available at youtube, which show [http://www.youtube.com/watch?v=-LoWGf-hqiQ how to checkout JOSM into Eclipse] and [http://www.youtube.com/watch?v=Z3OjG3nDvzA how to checkout a JOSM plugin into Eclipse]. === Using javac === You can also build josm without ant or eclipse. To do so, change into the `src/` folder and call `javac` on the file `org/openstreetmap/josm/gui/MainApplication.java` with all libs from `../lib/*.jar` in your classpath (you have to specify all subsequent). If running linux, be sure to have your `JAVA_HOME` set. As example, this could look like: {{{ $ svn co http://josm.openstreetmap.de/svn/trunk josm ''tons of output here'' $ cd josm/ $ update-alternatives --list javac /usr/lib/jvm/java-1.5.0-sun/bin/javac /usr/lib/jvm/java-6-sun/bin/javac $ export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun $ mkdir build $ javac -cp .:src:lib/metadata-extractor-2.3.1-nosun.jar:lib/gettext-commons-0.9.6.jar:lib/josm-translation.jar:lib/jfcunit.jar -d build src/org/openstreetmap/josm/gui/MainApplication.java $ java -cp .:build:lib/metadata-extractor-2.3.1-nosun.jar:lib/gettext-commons-0.9.6.jar:lib/josm-translation.jar:lib/jfcunit.jar org.openstreetmap.josm.gui.MainApplication }}}