Bugfixing terracer: 7. Have you Tried Restarting Your Program, Sir?
Posted by alexkemp on 17 January 2017 in English. Last updated on 26 January 2017.- There May be Troubles Ahead
- Errors whilst Compiling using Ant
- Creating Eclipse Project
- Eclipse Debugging Routines
- wORD cASE bLINDNESS
- Importing the Project Bugs
- Have you Tried Restarting Your Program, Sir?
- Show Your Bugs, Damn You!
- Be Careful What You Wish For
- Installing NetBeans
tl;dr: It seems that you simply need to be pig-headed & ignore all errors, clean the Build & restart & do it again (below is what I had to go through to discover this).
-
Configure Debian Jessie for JAVA-8 default usage:
(update-java-alternatives only works with manual-set settings)
(just one example (‘extcheck’) is given below for changing a ‘auto’ setting, which all default to Java-7)
(change them all to Java-8)
(some, such as browser plugins, do not have Java-8 binaries)$ sudo update-java-alternatives -l
$ sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
$ sudo update-alternatives --get-selections | fgrep -i java-7
$ sudo update-alternatives --config extcheck
$$(repeat with all others)
$ sudo update-alternatives --get-selections | fgrep -i java-7
itweb-settings auto /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/itweb-settings
javaws auto /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws
mozilla-javaplugin.so auto /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so -
Create a menu launcher for eclipse-oxygen
$ cp /usr/share/applications/eclipse.desktop ~/.local/share/applications/eclipse-oxygen.desktop
$ nano ~/.local/share/applications/eclipse-oxygen.desktop
$ cat ~/.local/share/applications/eclipse-oxygen.desktop
[Desktop Entry]
https://wiki.openstreetmap.org/wiki/Tag:Type=Application
https://wiki.openstreetmap.org/wiki/Tag:Name=Eclipse-Oxygen
https://wiki.openstreetmap.org/wiki/Tag:Comment=Eclipse Integrated Development Environment
https://wiki.openstreetmap.org/wiki/Tag:Icon=eclipse
https://wiki.openstreetmap.org/wiki/Tag:Exec=~/eclipse/java-oxygen/eclipse/eclipse
https://wiki.openstreetmap.org/wiki/Tag:Terminal=false
https://wiki.openstreetmap.org/wiki/Tag:Categories=Development;IDE;Java; - Empty ~/workspace of all files
- Open Eclipse-oxygen & select “workspace/” as the Workspace
- Remove the Welcome screen (click on ‘x’)
- Install Eclipse
Subversive( http://www.eclipse.org/subversive/downloads.php )
(drag & drop ‘Install’ link into a running Eclipse workspace to install Subversive)
(see also https://youtu.be/04L4rkykWZw ) - After restart, install
SVN Connector
(GoWindow ▸ Perspective ▸ Open Perspective ▸ Other...)
(SelectSVN Repository Exploring+ pressOK)
(Check aSVN Kit connector+ press OK)
(PressNext>+ accept the Licence agreement + pressFinish)
(Accept the unsigned software Security warning) (prats)
(Restart when finished. Again.) - Click on
File ▸ New ▸ Other - Open the
SVN categoryand selectRepository Location+ Press Next> - Paste the URL: https://svn.openstreetmap.org/applications/editors/josm/ + Press
Finish
(a vast, long wait at this point)
(I eventually restarted & opened theRepositoryview)
(Window ▸ Perspective ▸ Open Perspective ▸ SVN Repository Exploring)
(There were now 3 lines in theSVN Repositorieswindow)
(I removed two, then right-clicked on the last one & chose ‘Check-out’)
(Finally the bottom-right of the window showed activity…)
(now to import the existing project) File ▸ Import- (expand
General) selectExisting Projects into Workspace+ PressNext> - Click
Browse...onSelect root directoryand navigate to/workspace/josm/core - The text in the
Projectsbox now readsJOSM (~/workspace/josm/core)and needs to be selected - Press
Finish - It now says ‘Building Workspace’ but rapidly stops with the error:
Error !!! Unable to find jar file (for extension jj), check the JavaCC options of the project(@ 17/01/2017 00:06:20)
(I have already installed this once & have zero idea as to why I’m expected to install it again)
(I begin to re-install it but it quickly tells me that it is already installed)
(I click on ‘Hide items that are already installed) and discover another item hidden beneath it:)
(SF JavaCC Eclipse Plug-in feature 1.5.33 - I install that)
(However, the whole thing turns out to be a bug, and it reports it to be already installed)
(This is getting boring)
(Click on a ‘What is already installed?’ link, select the plugin + click onuninstall, then restart)
(Reinstall the plugin from scratch, and restart)
(Identical error - really boring)…
(Select josm (or JOSM) inPackage Explorer, then goProject ▸ Properties ▸ JavaCC Options)
(I changeSet the JavaCC jar filefrom ${project_loc}/tools/javacc.jar to ~/.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/javacc-6.0.jar)
(I changeSet the JTB jar filefrom ${eclipse_home}/plugins/sf.eclipse.javacc_1.5.27/jtb-1.4.7.jar to ~/.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/jtb-1.4.11.jar)
(PressOKthenYesonRebuild the Project) - Right click on josm in
Package Explorer▸Debug As ▸ Java Applicationon~/workspace/josm/core/eclipse/JOSM (Java 8)
(this quickly goes to the Debug screen; I need to pressf8(Resume) until it throws an exception that the JOSM bug-report system can catch)
(I report the bug https://josm.openstreetmap.de/ticket/14258 ) - Press
Project▸Clean...; restart Eclipse; doDebug Asidentical to before
(so that the first src file + line that it stopped at could be reported) - JOSM load goes all the way to the first screen (choose location load, etc). Bugger!
(I’ve tried a second time & it seems that you simply need to get the errors the first time, then restart & do it again, and everything works fine)
Discussion
Comment from R0bst3r on 17 January 2017 at 07:41
Great posts and absolutely well documented! It will work out in the end, good luck.
Comment from Stereo on 26 January 2017 at 08:57
I actually find your debugging posts quite terrifying - it explains why the JOSM developers are such a small group!
Comment from alexkemp on 26 January 2017 at 10:21
Hi https://www.openstreetmap.org/user/Stereo
Well, those ‘developers’ do not yet include me.
I’ve just spent 3 days adding 100 terraces (>200 houses) without an exception being thrown. I’ve also spent weeks & weeks working on JOSM with Eclipse & cannot find any way in which I can debug
terracer, largely (it seems in my ignorance) to the decision to use a non-standard ‘Main’ as the start-routine (rather than ‘main’). Even ifterraceris clear of fatal bugs it has lots of non-fatal bugs to fix, but I cannot find the way to launch it as part of a JOSM debug session.I’m going to try netbeans instead, I think.