Changes between Version 45 and Version 99 of InstallNotes


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • InstallNotes

    v45 v99  
    11[[TranslatedPages]]
    2 == Semi-Stable Version ==
    3 The latest semi-stable version is always here: [http://josm.openstreetmap.de/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.
     2[[PageOutline(2-10,Table of Content)]]
    43
    5 == Nightly Builds ==
    6 You can always grab the latest nightly build from [http://josm.openstreetmap.de/josm-latest.jar]. Many users actually use this for their daily work.
     4Read [wikitr:/Download#Recommendedoptions Recommended options] first.
    75
    86== Running ==
     7A working Java Runtime Environment version 11 or newer is needed to run JOSM.
     8
    99=== Microsoft Windows ===
    1010Double click on the jar file.
    1111
    12 If this does not work, you probably need to install the [http://java.com/download/index.jsp Java Runtime]
     12If this does not work, you probably need to [wikitr:/Download#Doubleclickonafiledoesnothing install the Java Runtime Environment].
    1313
    14 In more extensive edit sessions, you may get an "out of memory" error. To avoid this, the assigned memory can be increased.[[BR]]
    15 Create a shortcut like in the following example:
    16 {{{
    17 C:\WINNT\system32\java.exe -jar -Xmx512M "C:\PATH-TO-JOSM\josm-latest.jar"
    18 }}}
     14To avoid the Java console windows staying open, you can use `javaw.exe` instead of `java.exe`.
     15
     16Be careful if you run a 64-bit version of Windows, the Java Runtime (update every month) may be installed in 64-bit when visiting the Java website with a 64-bit version of your browser, or in 32-bit otherwise.
     17Both Java platforms will coexist on the PC, but by default the file associations will run first the 32-bit version, creating VMs limited to a maximum of 247MB (if your VM size reaches this limit, due to the volume of data loaded, JOSM may become very slow or unresponsive).
     18
     19But, the JAR extension will only be launched with the 32-bit version of the Java Runtime ("\Program files (x86)\bin" folder, instead of "\Program files\bin" for the 64-bit version) since the v8u66 if both versions are installed.
     20
     21Visit the www.java.com main site, choose to download java ... and chose the i586 package. You can keep the 64-bit package because it is not installed at the same location than the 32-bit (i586) package.
     22
     23If only a 64-bit version of Java is installed on a 64-bit version of Windows (and with a Java version higher or equal to the minimum version specified in the JNLP if you use JavaWebStart to download/update and launch JOSM), JOSM will start automatically in a 64-bit Java VM (with more memory available to handle larger volumes of data, and better performance). Otherwise, it will launch in a 32-bit Java VM, unless you add VM parameters to the command line to locate and use the 64-bit version of Java.
     24
     25But you may also uninstall any 32-bit versions of Java if you don't need applets in a 32-bit browser (the 32-bit version of Java remains useful when using an old 32-bit browser for using applets in web pages, or for 32-bit OSes where this is the only choice available on the web or in standalone usage).
    1926
    2027=== Linux / *BSD ===
     28''See also'': [wikitr:/HowTo/JOSM-under-Linux HowTo JOSM-under-Linux]
    2129
    22  '''using the shell'''::
     30 **packages**::
     31 In some Distributions, prepacked packages exist to install JOSM with your favorite package manager from the repositories.
     32 Although these packages might be a bit older than the .jar files on the main page, they usually fit better into the environment and install dependencies and a starter in the menu automatically.
     33
     34 **Note**: There is no problem with installing the prepacked package and still using the .jar files listed above but be careful with additional packages like josm-plugins (see #7483).
     35
     36
     37 For SUSE and Ubuntu/Debian, there are also packages on this page available ( [wikitr:/Download#openSUSE SUSE], [wikitr:/Download#Ubuntu Ubuntu]).
     38 If there exists no package or you do not want to use it you can download the JOSM .jar file from the [wikitr:/WikiStart main page] (tested or latest version) or build it from source.
     39
     40 **using the shell**::
    2341  Go to the directory where the josm-latest.jar is and type
    2442{{{
     
    2644java -jar josm-latest.jar
    2745}}}
    28   to launch. Replace `''josm-latest.jar''` with the name of the jar file you loaded, e.G. `josm.jar` for releases.
     46  to launch. Replace `josm-latest.jar` with the name of the jar file you loaded, e.G. `josm.jar` for releases.
    2947
    3048  If this doesn't help, try to set your JAVA_HOME variable to the java location (the root location, not the bin. As example:
    3149{{{
    3250#!sh
    33  export JAVA_HOME=/usr/lib/sun-j2se5.0-jdk
     51 export JAVA_HOME=/usr/lib/jvm/default-java
    3452 java -jar ''josm.jar''
    3553}}}
    3654
     55 See also [wikitr:/Help/CommandLineOptions command line options] and [wikitr:/HowTo/JOSM-under-Linux Josm under Linux Howto] for additional info.
    3756 '''KDE'''::
    38   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.
     57  There is a [/download/tutorials/setting_up_kde.avi tutorial] on how to setup your environment to start jar-files by clicking on them.
    3958
    4059 '''GNOME'''::
    41   Right click on the JAR file, and select __O__pen with "Sun Java 5.0 Runtime", or whatever java version you have.
     60  Right-click on the JAR file, and select __O__pen with "OpenJDK11 Runtime", or whatever Java version you have.
    4261
    4362 '''XGL/Compiz'''::
     
    4766export AWT_TOOLKIT=MToolkit && java -jar josm-test.jar
    4867}}}
    49   as described here: http://kubasik.net/blog/index.php/2006/06/19/java-sun-150-and-xglcompiz-on-ubuntu/
    50 
    51  '''Blank window on startup'''::
    52 
    53 AWT before JDK7 [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6574362 doesn't play well] with non-reparenting window managers (i.e. xmonad, awesome, dwm, ratpoison, Ion3, ...), resulting in the main window not being displayed properly on startup.  The Awesome Wiki has [http://awesome.naquadah.org/wiki/Problems_with_Java workarounds] for this problem.  There is also an [http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-SetWMName.html xmonad specific] way of doing the wmname thing.
     68  as described here: [https://web.archive.org/web/20060718112352/http://kubasik.net/blog/index.php/2006/06/19/java-sun-150-and-xglcompiz-on-ubuntu/ http://kubasik.net/blog/index.php/2006/06/19/java-sun-150-and-xglcompiz-on-ubuntu/]
    5469
    5570=== MacOS ===
    56 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).
     711. 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).
    5772
    58 This way to start JOSM should be sufficient in most cases.
     73 This way to start JOSM should be sufficient in most cases.
     74 
     752. If you are running Mountain Lion, you will need to temporarily disable Gatekeeper. Otherwise, you will be unable to open josm and upon launching josm, receive the error message "JOSM.app is damaged and can't be opened. You should move it to the Trash". Disable Gatekeeper by opening System Preferences > Security & Privacy, and setting 'Allow applications downloaded from:' to 'Anywhere'. Once you open the application, you can re-enable gatekeeper, and it appears that JOSM will open again without a problem. See [osmwww:user/drnoble/diary/17636 this] and #7904 for more information.
    5976
    60 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:
     773. If you get "The Java JAR file could not be launched", chances are you are running an old Java version.  Run from a terminal to check, as nothing appears in the system log.
     78[[Image(OSX_Error.png)]]
    6179
    62 Start the "Terminal" application (e.g. by typing "Terminal" into the Spotlight search)
     804. If you need to supply parameters (e.g. -Xmx2048M to run with more Java memory) you can use the MacOS "Terminal":
    6381
    64 Now you have two options:
     82 Start the "Terminal" application (e.g. by typing "Terminal" into the Spotlight Search, ⌘+space)
     83[[Image(SearchTerminal.png)]]
    6584
    66 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):
     85* Now you have two options:
     86 * type in the following command and press "Enter" to start JOSM without any special java options (simply starts up JOSM like under point 1):
    6787{{{
     88#!sh
    6889java -jar FOLDER/josm-latest.jar
    6990}}}
    70 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:
     91 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 Mac OS X "Downloads" Folder it would look like:
    7192{{{
    72 java -jar Download/josm-latest.jar
    73 
     93#!sh
     94java -jar Downloads/josm-latest.jar
    7495}}}
    7596
    76 b.) to use additional java options just add them right after "java"
    77 
    78 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:
    79 {{{
    80 java -Xmx256M -jar FOLDER/josm-latest.jar
    81 }}}
    82 
    83 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).
    84 
    85 By the way. To get an overview of all Java start options you can type in:
    86 
    87 {{{
    88 java -help
    89 }}}
    90 
    91 == Getting the Source ==
    92 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]
    93 
    94  svn co http://josm.openstreetmap.de/svn/trunk josm
    95 
    96 Or you can inspect single files over the web frontend at http://josm.openstreetmap.de/svn.
    97 
    98 == Compiling ==
    99 === Using ant ===
    100 The easiest way to compile JOSM provided Java on your machine is properly set up is to go to the josm directory and type:
    101 
    102 {{{
    103  ant
    104 }}}
    105 
    106 That will create a `dist/josm-custom.jar` file if successful.
    107 
    108 === Using eclipse ===
    109 
    110 Use eclipse and the provided `.project` and `.classpath` file. Just add a new Java Project using the JOSM source folder as existing path.
    111 
    112 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].
    113 
    114 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].
    115 
    116 === Using javac ===
    117 
    118 You can also build josm without ant or eclipse. To do so, 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, this would look like that:
    119 
    120  * Choose the right version of the java compiler (1.6)
    121 
    122 {{{
    123 $ sudo update-alternatives --config javac
    124         There are 2 choices for the alternative javac (providing /usr/bin/javac).
    125 
    126           Selection    Path                                   Priority   Status
    127         ------------------------------------------------------------
    128         * 0            /usr/lib/jvm/java-6-sun/bin/javac       63        auto mode
    129           1            /usr/lib/jvm/java-1.5.0-sun/bin/javac   53        manual mode
    130           2            /usr/lib/jvm/java-6-sun/bin/javac       63        manual mode
    131 
    132         Press enter to keep the current choice[*], or type selection number: 1
    133         update-alternatives: using /usr/lib/jvm/java-1.5.0-sun/bin/javac to provide /usr/bin/javac (javac) in manual mode.
    134 $ export JAVA_HOME=/usr/lib/jvm/java-6-sun
    135 }}}
    136  (Alternatively you can provide the full path when running javac.)
    137  * Check out the sources
    138 
    139 {{{
    140 $ svn co http://josm.openstreetmap.de/svn/trunk josm
    141         ''tons of output here''
    142 $ cd josm/
    143 $ mkdir build
    144 }}}
    145  * Compile and run
    146 {{{
    147 $ javac -cp .:src:lib/metadata-extractor-2.3.1-nosun.jar:lib/signpost-core-1.1.jar -d build src/org/openstreetmap/josm/gui/MainApplication.java
    148 $ java -cp .:build:lib/metadata-extractor-2.3.1-nosun.jar:lib/signpost-core-1.1.jar org.openstreetmap.josm.gui.MainApplication
    149 }}}
     97== See also ==
     98* [[wikitr:/Source code#Getthesource|Get the source]]
     99* [[wikitr:/Source code#CompilingusingAnt|Compiling using Ant]]