Java Perl CSS Groovy HTML NSIS Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.externalToolBuilders fix #13344 - Unable to run unit tests in Eclipse Aug 18, 2016
.settings update to Groovy 2.5.0 and Eclipse Photon (4.8.0) Jul 8, 2018
data fix #16602 - add 'material' and 'start_date' to tourism=artwork prese… Aug 12, 2018
data_nodist i18n update Jul 28, 2018
eclipse see #15560 - upgrade to equalsverifier-2.4.4 (contains ASM 6.1 for Ja… Mar 12, 2018
images Merge branch 'master' into mirror Aug 11, 2018
images_nodist fix #15769, see #12297, see #12386 - Add power=catenary_mast and powe… Aug 11, 2018
linux see #16047 - Oracle JDK? nope Aug 8, 2018
macosx/ fix #13980 - Tell Mac OS X we don't always need a dedicated graphics … Nov 15, 2016
netbeans drop unitils library. It was only added to avoid implementing hashCod… Aug 5, 2018
patches update to JavaCC 6.1.9 + patch for TokenMgrError.template Jun 15, 2016
resources/org/glassfish/json see #15682 - fix Jan 14, 2018
scripts see #15229 - deprecate `Main.pref` Aug 12, 2018
src Merge branch 'master' into mirror Aug 14, 2018
styles/standard fix #15769, see #12297, see #12386 - Add power=catenary_mast and powe… Aug 11, 2018
styles_nodist see #13217 - replace about 166 png icons by svg from https://trac.ope… Aug 2, 2016
test Update TestUtils.assumeWorkingJMockit - two tests are not skipped wit… Aug 15, 2018
tools tools update: awaitility 3.1.2, equalsverifier 2.5.1, jmockit 1.41, r… Aug 5, 2018
windows see #16260 - increase default memory options to 2GB May 9, 2018
.checkstyle see #14794 - update to checkstyle 8.0 (to match the version used by E… Aug 9, 2017
.classpath drop unitils library. It was only added to avoid implementing hashCod… Aug 5, 2018
.project fix #13344 - Unable to run unit tests in Eclipse Aug 18, 2016
.travis.yml fix #16601 - test targets: add "-hardfail" variants which will abort … Aug 12, 2018
CONTRIBUTION ignore indoor=room for now May 25, 2018
Dockerfile see #15226 - see #2089 - use "noJavaFx" flag in Dockerfile Sep 7, 2017
LICENSE see #9590 - JSON code is not compatible with GPL Feb 14, 2014
README fix #15880 - support ESRI projections and update to EPSG database v9.… Feb 9, 2018
appveyor.yml see #15742 - AppVeyor: do not upload javadoc artifact, too big Jan 7, 2018
build.xml Merge branch 'master' into mirror Aug 12, 2018
docker-test.bat Dockerfile and scripts to start tests under Docker for Windows and Li… Jan 8, 2017 Dockerfile and scripts to start tests under Docker for Windows and Li… Jan 8, 2017
gpl-2.0.txt see #13344 - fix checkstyle configuration with new Eclipse settings Aug 19, 2016
gpl-3.0.txt cleanup license and contributions a bit Jul 17, 2009
josm-latest.jnlp fix #16311 - set JNLP max-heap-size to 2GB May 24, 2018
josm.jnlp fix #16311 - set JNLP max-heap-size to 2GB May 24, 2018
snapcraft.yaml see #14576 - update description with text from https://josm.openstree… Apr 2, 2017


Supplemental information for JOSM -- the Java OpenStreetMap Editor

            I. Install & Launch

Installation notes
To run JOSM, you need:

* The JOSM .jar file, e.g., josm-tested.jar or josm-latest.jar
* Java Runtime Environment (JRE) 8, or later.

How to get Java Runtime Environment
You need JRE Version 8, or later.

Microsoft Windows and Apple Mac OS X users should visit
and download the latest Java executable for their system.

Linux users should visit
There is a Linux binary installer, which you must execute from a console, or
use the mechanism of your distribution's packaging system.

How to launch
Microsoft Windows users launch by double-clicking on the .jar file.
If this does not work, open a command shell and type
"java -jar josm-latest.jar"  in the directory that holds the file. (Please
replace josm-latest.jar with the name of your .jar file, if you aren't using
the latest version.)

Under Linux, open a shell, go to the file directory and type
"java -jar josm-latest.jar" to launch. If this does not work, try to set
your JAVA_HOME variable to the java executable location (the root location,
not the bin).

macOS users just click on the .jar file icon.

            II. Development

How to get the source code
Download it directly from the subversion at To use the command line subversion
client, type

svn co josm

Files & directories
This is an overview of the files and directories in the JOSM code repository:
- build.xml                 ant build file (standard way to create a JOSM binary)
- CONTRIBUTION              list of major code contributors
- data/                     data files that will be included in the JOSM jar file
    - fonts/                font files used for map rendering
    - gpx/                  different color gradients for gpx drawing
    - projection/           projection files
      - custom-epsg         list of projection definitions, auto-generated file created by ant task 'epsg'
    - security/*.pem        certificates that we like to accept for TLS connections, but are missing in the
                            default Java certificate store
    - validator/            data files used by the JOSM validator
      - *.cfg               files designed for the old tagchecker, still in use
      - *.mapcss            default validation rules for the MapCSS-based tagchecker
      - opening_hours.js    Javascript code to validate opening hours tag
                            (external library, see
    - boundaries.osm        OSM file containing boundary data for the states of the earth, including
                            data for right and left-hand traffic
    - defaultpresets.xml    data file for the core tagging presets
    - help-browser.css      CSS file for the help sites (HTML content is downloaded from the website
                            on demand, but displayed inside the programm in a Java web browser component.)
    - overpass-wizard.js    Javascript code to provide a wizard-GUI for creating Overpass requests
                            (external library, see
    - *.lang                translation data
    - *.xsd                 xml schema files for validation of configuration files
- data_nodist/              data files that are useful for development, but not distributed
    - exif-direction-example.jpg
                            sample image, that contains direction information in the EXIF header
                            (keys: Exif.GPSInfo.GPSImgDirectionRef, Exif.GPSInfo.GPSImgDirection)
    - filterTests.osm       used for unit testing of the filter feature
                            (see test/unit/org/openstreetmap/josm/data/osm/
    - Join_Areas_Tests.osm  some examples to test the 'join areas' feature
    - *.*                   various other data files used for unit testing and as reference file
    - projection/           projection files
      - *.gsb               NTv2 grid files for projection support, downloaded by the
                            client on demand (see CONTRIBUTION)
      - CHENyx06-Distribution.pdf
                            archive of terms of use for the CHENyx06.gsb file
      - epsg                EPSG data file, taken from the proj.4 project
      - esri                ESRI data file, taken from the proj.4 project
      - josm-epsg           customizations to the epsg file, used together with the epsg file
                            to generate data/projection/custom-epsg
      - projection-reference-data.csv
                            reference data for projection tests
                            (see test/unit/org/openstreetmap/josm/data/projection/
      - projection-regression-test-data.csv
                            regression data for projection tests
                            (see test/unit/org/openstreetmap/josm/data/projection/
    - trans/*.lang          translation data for files that are not distributed, but used
                            by the server for localization of the services;
                            currently contains plugin descriptions in order to include translations
                            in the downloaded plugin list
- gpl-2.0.txt, gpl-3.0.txt  full text of the GNU General Public License
- images/                   images distributed with the JOSM binary
    - icons                 images for the Potlatch 2 style
    - presets               images for the main mappaint style and the internal presets
- images_nodist/            images, which are not for distribution, but may be useful later (e.g. high
                            resolution and vector versions)
- josm.jnlp                 Java Web Start launcher file (used on the website for the tested version)
- josm-latest.jnlp          Java Web Start launcher file (used on the website for the latest version)
- LICENSE                   the JOSM license terms
- linux/                    files useful for Linux distributions, including Appdata files, .desktop
                            files, Debian/Ubuntu scripts, man pages, icons, etc.
- macosx/                   files needed to create the MacOS X package
- netbeans/                 preconfigured Netbeans project
- patches/                  patches for external libraries used in JOSM (see below)
- README                    this file
- resources/                resource files that will be included in the JOSM jar file
- scripts/                  various scripts used by JOSM developers
                            called from the ant build file to combine the files epsg and josm-epsg
                            to create the custom-epsg file for distribution
  -             tool to find all used icons and allows deleting unused icons
                            searches also for images with incompatible svg code
  - optimize-images         short script to decrease size of PNG images
  -         helper script to update language links in presets file
  -            developer tool to replace "@since xxx" in Javadoc by the upcoming revision number
  - SyncEditorLayerIndex.groovy
                            script to compare and analyse the differences of the editor layer index and the
                            JOSM imagery list (see
  - TagInfoExtract.groovy   extracts tag information for the taginfo project
- src/                      the source code of the application
- start.html                HTML page to run the applet version of JOSM
- styles/                   map styles included in JOSM
- sytles_nodist/            files needed for map style maintenance
    - potlatch2/README      infos on how to update the Potlatch 2 style from upstream sources
- test/                     automated software tests
    - data/                 resources used for some tests
    - functional/           functional tests (source code)
    - lib/                  libraries needed for (some of) the tests, including JUnit
    - performance/          performance tests (source code)
    - unit/                 unit tests (source code)
- tools/                    libraries and tools that help in the development process
    - animal-sniffer-ant-tasks.jar
                            used to build and check code signatures to ensure plugins binary compatibility 
    - appbundler-1.0ea.jar  used to build Mac OS X package
    - checkstyle/           libs and config files for checkstyle (automatically detects code style
                            problems in source code); can be launched as an ant target in build.xml
    - commons-cli-1.3.1.jar dependency of Groovy Ant task
    - error_prone_ant.jar   used to detect code errors during compilation
    - spotbugs/             libs and config files for spotbugs (automatically detects common bugs and potential
                            problems in source code); can be launched as an ant target in build.xml
    - groovy-all.jar        used for some unit tests and various scripts
    - jacocoant.jar         used to include coverage data into JUnit test reports
    - japicc/               used to generate a compatibility report between optimized jar and normal one
    - javacc.jar            used in the build process to generate some .java files from a javacc source file
    - proguard.jar          optimize final binary jar - see build.xml (not used in production so far)
    - xmltask.jar           used to edit XML files from Ant for the OSX package
- windows/                  files needed to create the Windows installer

The 'patches' directory
Some libraries that JOSM depends on, are patched for various reasons. The
files in the patches directory can be used to roll back these customizations.
This is useful in order to
 * inspect the changes
 * update to a newer version of the library but keep the modifications

You can use 'quilt' to manage the patches. E.g. the following command applies all of them:

 $ quilt push -a

Of course, it is also possible to apply the patch files manually one by one.

Third party libraries
There are some third party libraries which are directly included in the source code tree, in particular:

* jmapviewer: Java component to browse a TMS map
    src/org/openstreetmap/gui (svn external)
* Apache commons compress: Support for bzip2 compression when opening files
    src/org/apache/commons/compress/compressors (svn external)
* Apache commons validator: Improved validator routines
* SVG Salamander: Support for SVG image format
* Metadata Extractor: Read EXIF Metadata of photos
* Signpost: OAuth library
    src/oauth, src/com/google
* GNU getopt Java port: Command line argument processing library
* MultiSplitPane: Small lib for GUI layout management
* swinghelper: Class CheckThreadViolationRepaintManager to find classpath violations
* xz extractor