| | 1 | [[TranslatedPages]] |
| | 2 | == Майже стабільна версія == |
| | 3 | Остання майже стабільна версія завжди знаходиться за адресою: http://josm.openstreetmap.de/download/josm-tested.jar - ми не називаємо її «випуском» тому що в той час як вона є більш надійною порівняно із тестовою версією, вона не проходить через численні перевірки потрібні для випуску стабільної версії. |
| | 4 | |
| | 5 | == Нічні збірки == |
| | 6 | Ви завжди можете отримати нічну збірку за адресою http://josm.openstreetmap.de/download/josm-latest.jar. Велика кількість користувачів використовують її для повсякденної роботи. |
| | 7 | |
| | 8 | == Запуск == |
| | 9 | === Microsoft Windows === |
| | 10 | Подвійним клацанням на jar-файлі. |
| | 11 | |
| | 12 | Якщо це на спрацьовує, Вам можливо встановити [http://java.com/download/index.jsp Java Runtime] |
| | 13 | |
| | 14 | Якщо ви правите дуже великі обсяги інформації, Ви можете отримати повідомлення про помилку "out of memory" (недостатньо пам’яті). Щоб цього уникнути, об’єм пам’яті можливо збільшити.[[BR]] |
| | 15 | Створіть ярлик подібний до прикладу: |
| | 16 | {{{ |
| | 17 | C:\WINNT\system32\java.exe -jar -Xmx512M "C:\PATH-TO-JOSM\josm-latest.jar" |
| | 18 | }}} |
| | 19 | |
| | 20 | === Linux / *BSD === |
| | 21 | |
| | 22 | '''використовування оболонки''':: |
| | 23 | Перейдіть до теки де знаходиться josm-latest.jar та введіть |
| | 24 | {{{ |
| | 25 | #!sh |
| | 26 | java -jar josm-latest.jar |
| | 27 | }}} |
| | 28 | для запуску. Замініть `''josm-latest.jar''` на ім’я завантаженого jar-файлу, наприклад `josm.jar` для стабільної версії. |
| | 29 | |
| | 30 | Якщо це не допомогло, спробуйте встановити змінну JAVA_HOME призначивши їй місце розташування java, наприклад: |
| | 31 | {{{ |
| | 32 | #!sh |
| | 33 | export JAVA_HOME=/usr/lib/sun-j2se5.0-jdk |
| | 34 | java -jar ''josm.jar'' |
| | 35 | }}} |
| | 36 | |
| | 37 | '''KDE''':: |
| | 38 | Ось [http://josm.openstreetmap.de/download/tutorials/setting_up_kde.avi посібник] як налаштувати ваше оточення для запуску jar-файлів клацаючи на них. |
| | 39 | |
| | 40 | '''GNOME''':: |
| | 41 | Клацніть правою клавішею миші на JAR-файлі та оберіть __O__pen with "Sun Java 6.0 Runtime", чи щось подібне. |
| | 42 | |
| | 43 | '''XGL/Compiz''':: |
| | 44 | Наберіть це в оболонці: |
| | 45 | {{{ |
| | 46 | #!sh |
| | 47 | export AWT_TOOLKIT=MToolkit && java -jar josm-test.jar |
| | 48 | }}} |
| | 49 | як про це йдеться у: 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. |
| | 54 | |
| | 55 | === 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). |
| | 57 | |
| | 58 | This way to start JOSM should be sufficient in most cases. |
| | 59 | |
| | 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: |
| | 61 | |
| | 62 | Start the "Terminal" application (e.g. by typing "Terminal" into the Spotlight search) |
| | 63 | |
| | 64 | Now you have two options: |
| | 65 | |
| | 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): |
| | 67 | {{{ |
| | 68 | java -jar FOLDER/josm-latest.jar |
| | 69 | }}} |
| | 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: |
| | 71 | {{{ |
| | 72 | java -jar Download/josm-latest.jar |
| | 73 | |
| | 74 | }}} |
| | 75 | |
| | 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 | }}} |