JOSM/Mac

From OpenStreetMap Wiki
Jump to: navigation, search
Mac OS X logo

This page give notes for JOSM on Mac OS X (installing and using).

System requirements

For the recent Java 7, which is required(!) by the current JOSM versions, you'll need at least Mac OS X 10.7.3 (see below). You could get older JOSM versions to work with this: Mac OS X 10.4 or better, with Java 1.5. 10.3 will not do the job.

Installation

  • Download josm-macosx.zip
  • Double click to unzip it to a folder
  • Drag JOSM.app icon to your 'Applications' folder
  • You can safely delete the unzipped folder and remaining files left behind.

Notes for Mac OS X 10.6

On Mac OS X 10.6 you are stuck with Apple's version of Java 6. This means the most recent versions of JOSM will not run, but you can install an older version:

Use JOSM version 7000 for Java 6 (version 7000 is the last release compatible with Java 6).

Notes for Mac OS X 10.7.3 and later

Apple decided to not provide Java pre-installed for recent Mac OS-X 10.7 (Lion) but the good news is, on 10.7.3 and above you can install a recent Java version 7. You may already have java installed.

Test which version of java you have

If you have a 1.6 version of java, the quick solution could be to run an older version of JOSM v7000 which is the last release compatible with Java 6.

If you have no java, or you want to upgrade to java 7 or newer, you should be able to visit https://www.java.com , click 'download' and follow the instructions.

However some users have (in year 2014) reported problems using the JRE as opposed to the JDK (Java development kit). You can get the java development kit.

If you're upgrading you may have to deinstall Java 6. More information about how to install and deinstall java on a Mac can be found on java.com. Note if you use the chrome browser, this could cause very very few websites (those which use java) to stop working.

Start

Double-click the JOSM.app icon in Applications folder.

The first time you run it, you'll get a warning about an application from the internet

For quick access every time, add it to your dock at the bottom. Drag the icon and drop it there

Updating JOSM

JOSM will nag you to update when new versions become available. To update JOSM...

  • Download the newest josm-macosx.zip
  • Quit from JOSM if it is running
  • Delete JOSM.app from the 'Applications' folder (Note: This does not delete your plugins or settings)
  • Return to your new download, and unzip it.
  • Drag the new JOSM.app icon back to the 'Applications' folder.

When you run it again, you'll get a warning again about an application from the internet. You may also get a message "You updated your JOSM software. To prevent problems the plugins should be updated as well". It's usually best to 'Update plugins'

Mac keyboard quirks

Because of the way standalone java applications run on mac, and because mac has several extra "control" keyboard buttons, it can be that surprising things happen with keyboard shortcuts, however this has been improved in recent mac packages. Hopefully you can now use ⌘+C and ⌘+V for copying and pasting everything (but if it's not working for you, you might try Ctrl + C and Ctrl + V)

  • To 'Delete' elements: fn + 'backspace ←'

Mac mouse/trackpad quirks

  • Zooming on a trackpad: do a two-fingered swipe (not pressing)
  • Panning on a trackpad: do a two-fingered drag (pressing)
  • Zooming using a single-button mouse: You can't! Press + to zoom in.
  • Panning using a single-button mouse: Hold the 'Ctrl' key while dragging

Or just get a separate mouse with two buttons and scroll-wheel. It's much better!

More installation notes

Java version

There are several ways to figure out which version of java you have:

Web method : Test which version of java you have online (according to browser plugins)

System prefs method: Under 'System preferences' see the 'java' icon, then got to 'update' tab to see if you're up to date.

Terminal method: Open a terminal and type: java -version Ideally the output would look somewhat like this

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)


Memory

If you need to allocate more memory to JOSM (in order to edit larger files or you get the 'strange things may happen' memory error), try one of the following methods.

Option 1: Using the .jar file directly

  1. Make sure JOSM isn't open so it can be started using the Terminal application
  2. Open Terminal (from Applications/Utilities/ in Finder)
  3. Change to the directory where josm-latest.jar is... If it's on your desktop, try 'cd Desktop'
  4. Copy and paste the following line in to the terminal to start JOSM with more memory:
java -Xmx512M -jar josm-latest.jar

Include -Dapple.laf.useScreenMenuBar=true to place the menu on the OS X menu bar, and -Xdock:name="JOSM" -Xdock:icon="logo.png" to give it icon and name.

Option 2: Using Jar Bundler

You can also use the Jar Bundler application, which comes with MacOS X. You'll find it at /Developer/Applications/Java Tools/ or at /Developer/Applications/Utilities/ or at /usr/share/java/Tools/ (OSX 10.6 - Snow Leopard). Just double click to launch it.

In the first menu build information enter the location of the just downloaded JOSM jar file by clicking the choose... button. In the third menu properties choose the edit box vm options to enter the appropriate memory settings. If you're able to afford it try spending up to a GB RAM to JOSM.

Here's what to enter into the vm options edit box:

-Xmx512M -XX:MaxPermSize=512M

(This starts the JOSM application with 512MB and grants up to 1GB of RAM.)

Then press create application... to create the start application (call it JOSM!, for example). JOSM! does not have to be in the same directory as the jar file. Just save or move JOSM! to your applications folder. Double click JOSM! to start the JOSM application.

Option 3: Patching the Property List

If you've installed JOSM through webinstall and have a JOSM already, change the memory settings by these steps:

  1. locate JOSM in Applications
  2. Ctrl-Click (Right-Click) the icon and choose Show Package Contents
  3. select Contents
  4. double-click Info.plist, that should open the Property List Editor
  5. expand Java
  6. expand VMOptions
  7. add an item - various ways, e.g. through menu
  8. enter the value, e.g. -Xmx512M -XX:MaxPermSize=512M
  9. save
  10. (re-)start JOSM

Manually install JOSM plugins

Usually you don't need to install plugins manually! JOSM provides a plugin manager (under Edit/Preferences/Plugins) that makes it very easy to install plugins.

Plugins are manually installed by saving them in ~/Library/JOSM/plugins (earlier versions placed them in ~/.josm/plugins/)

A list of plugins is on the JOSM/Plugins page in this Wiki, and also in the JOSM Wiki.