wiki:Zh_CN:Download

下载

概述

操作系统无关 网络启动 Windows Mac OS X Ubuntu,… openSUSE
测试 19307 jar jnlp setup.exe便携版 package.zip 见下 见下
最新 19309 jar jnlp 见下
较旧 download/
  • 我应该使用哪个版本? (参见:发布系统
    • 测试版大约每月发布,应该不会含有严重漏洞
    • 最新版每天发布,可能有更多的错误
    • 如果可能的话,使用网络启动版,以自动更新。
  • 用 jarsigner 验证 josm.jar

  • 请注意,定期更新相当频繁,所以请尽量运行最新版(同时包括最新的插件)。
  • 访问 JOSM-网络启动,无需安装
  • 下载 JOSM 测试 版 19307
  • 下载 Windows JOSM 安装器 版 19307
  • 下载 Mac OS X JOSM 包 版 19307
  • 准备一个 USB 闪存驱动器,以在任何 Windows 机器上运行 JOSM。
  • 可使用下载脚本,以检查最新测试版的地址(或两个同时),以减少下载带宽
  • 如果下载文件的尺寸过大:
    • 在下载地址后添加 ?lang=…,以去除无用的翻译内容(例如,?lang=zh_CN 将下载只包含简体中文翻译的 JOSM)。
    • 注意:用下划线分隔语言代码和国家代码扩展,如“?lang=en_GB”
    • 添加 ?unsigned=1 以去除代码签名信息
    • 当同时使用 langunsigned 时,用 & 分隔,如 ?lang=zh_CN&unsigned=1

Mac OS X Mountain Lion 错误

OS X "gatekeeper" results in this very misleading error dialog

如下误导性的错误信息可能会出现:JOSM.app 已损坏,打不开。您应该将它移到废纸篓。

要完成安装,进入 OS X 首选项,访问“安全性与隐私”,并更改设置,以允许来自“任何地方”的下载内容。

在 JOSM 第一次运行后,可以将设置调回到原来的位置。

开发版本

  • 下载 JOSM 最新 版 19309(可能比“测试”版的错误更多,请当心)。

源代码

  • 获取源代码:
    • 从官方 Subversion 版本库(推荐):
      svn co https://josm.openstreetmap.de/svn/trunk josm
      
    • 从官方 OSM Subversion 版本库(包含插件):
      svn co https://svn.openstreetmap.org/applications/editors/josm
      
    • 从非官方 GitHub 镜像
      git clone git://github.com/openstreetmap/josm.git
      

openSUSE 源

Application:Geo 源中可获得测试版本的 JOSM。

首先,以 root 用户用 yast 或 zypper 添加软件源(用您使用的版本替换 URL 中的版本):

zypper ar -f http://download.opensuse.org/repositories/Application:/Geo/openSUSE_13.2 Application:Geo

然后安装 josmjosm-fonts 软件包。

Ubuntu 源

有一个针对 Ubuntu 的软件源。它也应该能在其他基于 Debian 的(尤其是基于 Ubuntu 的)发行版上工作,但我们不会主动测试和维护其他的任何发行版,除了 Ubuntu。
注:除了下文所述的常规步骤外,旧的 DEB 可从以下目录中下载并安装:josmjosm-latest

源中包含两个软件包:

josm
测试版
替换 Ubuntu 官方软件源中的包。
josm-latest
开发版(每夜构建)
可以与 josm 包并存。默认的首选项目录是 ~/.josm-latest

安装

编辑软件源列表 /etc/apt/sources.list

sudo editor /etc/apt/sources.list

并依据您的 Ubuntu 的版本加入以下行中的之一:

deb https://josm.openstreetmap.de/apt lucid universe
deb https://josm.openstreetmap.de/apt precise universe
deb https://josm.openstreetmap.de/apt quantal universe
deb https://josm.openstreetmap.de/apt raring universe
deb https://josm.openstreetmap.de/apt saucy universe
deb https://josm.openstreetmap.de/apt trusty universe
deb https://josm.openstreetmap.de/apt utopic universe
deb https://josm.openstreetmap.de/apt vivid universe

此外,以下代码也可完成同样的事:

echo deb https://josm.openstreetmap.de/apt $(lsb_release -sc) universe | sudo tee /etc/apt/sources.list.d/josm.list > /dev/null

对于其他基于 Debian 的发行版,添加如下行:

deb https://josm.openstreetmap.de/apt alldist universe

下载并注册公钥

wget -q https://josm.openstreetmap.de/josm-apt.key -O- | sudo apt-key add -

现在,刷新您的软件源

sudo apt-get update

并安装:

josm
(如果您之前未安装这些软件包,您可以跳过第一行。)
sudo apt-get remove josm josm-plugins
sudo apt-get install josm
josm-latest
sudo apt-get install josm-latest

有用的选项

如果 JOSM 内存耗尽,可以增加可分配内存的最大大小(在这个例子中为 400 MB):

JAVA_OPTS="-Xmx400M" josm

指定其它的首选项文件夹:

JAVA_OPTS="-Djosm.home=$HOME/.josm-tmp" josm

网络启动

您需要先安装 OpenWebStart。它将自行下载并运行 Java。从 Oracle WebStart 到 OpenWebStart 的过渡仍在进行中,因此如果出现问题,请创建 new ticket 或向 #17858 发表评论。

如果以前使用 Oracle WebStart,则可能需要更新用于打开 JNLP 文件的默认应用程序。有关将 OpenWebStart 设置为 jnlp 文件默认程序的说明,请参阅 jnlp file association

测试网络启动

  1. 下载 josm.jnlp 到桌面。
  2. 打开终端并移动到桌面,如上所示
  3. 输入 javaws josm.jnlp⏎。这将首先下载 JOSM,显示一个安全对话框,然后启动 JOSM。
  4. 如果失败,则键入 javaws -verbose josm.jnlp⏎。这将首先显示一个有关 JVM 信息的对话框,然后启动 JOSM。

Windows x64 中的虚拟机选项

For Windows, beware that some browsers may install their own JRE only in 32 bit mode, but may also install their version of the Javawebstart tool somewhere else with different file associations. This may cause your JNLP to start with this alternate JRE because it runs the wrong version of Javawebstart which only supports the 32 bit VM, and sometimes is built with a restricted support for VM options and a max VM size not exceeding 256MB.

Check, for example, if there's no other javawebstart in \Windows\SysWow64. You should not need it (the Java control panel will not detect it) and can safely delete it. Perfom cleanup and only keep the latest version of the JRE (1 for the 32-bit mode, another one for the 64-bit mode).

For shortcuts created on the desktop for JNLP and running the Javawebstart launcher (from \windows\system32), make sure to pass VM parameters prefixed with -J and no intermediate space before the VM option. If you have installed both the 32-bit and 64-bit version, you should pass the option "-d64" if you want to select the preferred 64-bit VM. Note that some Oracle documentation pages indicate the option "-D64" with the incorrect capitalization!)

Example of an edited commandline for the shortcut created on the windows desktop after running JOSM just once from the JNMP and exiting:

C:\Windows\System32\javaws.exe -J-d64 -Xmx=2048m -localfile -J-Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp "C:\Users\<snipped user name>\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\21\7311<snipped-hex-number>7f8"

You don't need to change the end of the command line with the snipped parts here. Just check the path for javaws.exe and add options -J-d64 for the 64-bit mode needed to work with large OSM datasets, and -Xmx=2048m to increase the VM size (to 2GB here).

Last modified 14 months ago Last modified on 2023-12-15T10:36:01+01:00
Note: See TracWiki for help on using the wiki.