OpenStreetMap logo OpenStreetMap

Bugfixing terracer: 10. Installing NetBeans

Posted by alexkemp on 22 January 2017 in English. Last updated on 26 January 2017.
  1. There May be Troubles Ahead
  2. Errors whilst Compiling using Ant
  3. Creating Eclipse Project
  4. Eclipse Debugging Routines
  5. wORD cASE bLINDNESS
  6. Importing the Project Bugs
  7. Have you Tried Restarting Your Program, Sir?
  8. Show Your Bugs, Damn You!
  9. Be Careful What You Wish For
  10. Installing NetBeans

I’m having stunning problems being able to debug terracer from within Eclipse and, after much investment of my time & attention, I am greatly concerned that it may prove impossible. I’ve asked for help in my bugreport & have received zilch. There has been small responses here (many thanks) but those have not helped either. One possible option is to use a different IDE. So, here is yet another attempt to prevent others from having to go through as much pain as me just to get the NetBeans IDE installed (help from NetBeans here + youtube here):

  1. Download the installer
    (I downloaded the basic Java SE installer for Debian Jessie x64 (currently 8.2) (all other components can be added after).
  2. Make it executable
    (chmod +x Downloads/netbeans-8.2-javase-linux.sh)
    (note that this is being installed locally for my use only)

    $ ls -Al ~/Downloads/netbeans-8.2-javase-linux.sh
    -rwxr-xr-x 1 user user 98264064 Jan 22 16:23 ~/Downloads/netbeans-8.2-javase-linux.sh

  3. Run it
    $ ./Downloads/netbeans-8.2-javase-linux.sh
  4. On Debian Jessie the above may fail as some NB-7.4 & later modules (such as Java SE) require the Java-8 JDK, whilst the default for Jessie is Java-7 (sigh) with the usual misleading error message:

    “Cannot find java. Please use the –jdkhome switch”
     
    and more-helpful link (see the nb wiki).
     
    Just as with Eclipse it is the JDK version that is important here, and not the JRE. The JRE is used to run NB on the computer, but the JDK is required for JAVA development work.
     
    The netbeans installer is supposed to offer a button to locate the JDK directory but that did not appear for me. The install will still occur, but all modules will be switched OFF. It can be fixed via either the .desktop launcher or the .conf file (see below).

  5. A netbeans icon appeared on the Desktop.
    Shades of Windows 95! This was a .desktop launcher. There was also another, identical, .desktop launcher at the more-conventional location, so I merged them:

    $ locate netbeans-8.2.desktop
    ~/.local/share/applications/netbeans-8.2.desktop
    ~/Desktop/netbeans-8.2.desktop
    $ cat ~/.local/share/applications/netbeans-8.2.desktop
    [Desktop Entry]
    https://wiki.openstreetmap.org/wiki/Tag:Encoding=UTF-8
    https://wiki.openstreetmap.org/wiki/Tag:Name=NetBeans IDE 8.2
    https://wiki.openstreetmap.org/wiki/Tag:Comment=The Smarter Way to Code
    https://wiki.openstreetmap.org/wiki/Tag:Exec=/bin/sh "~/netbeans/bin/netbeans"
    https://wiki.openstreetmap.org/wiki/Tag:Icon=~/netbeans/nb/netbeans.png
    https://wiki.openstreetmap.org/wiki/Tag:Categories=Application;Development;Java;IDE
    https://wiki.openstreetmap.org/wiki/Tag:Version=1.0
    https://wiki.openstreetmap.org/wiki/Tag:Type=Application
    https://wiki.openstreetmap.org/wiki/Tag:Terminal=0
    $ mv ~/Desktop/netbeans-8.2.desktop ~/.local/share/applications/netbeans-8.2.desktop

  6. The config file is within the install dir:
    (notice the commented-out previous value when the JDK fix was added, confirming with this old post):
    $ tail -17 ~/netbeans/etc/netbeans.conf
    # Default location of JDK:
    # (set by installer or commented out if launcher should decide)
    #
    # It can be overridden on command line by using --jdkhome <dir>
    # Be careful when changing jdkhome.
    # There are two NetBeans launchers for Windows (32-bit and 64-bit) and
    # installer points to one of those in the NetBeans application shortcut
    # based on the Java version selected at installation time.
    #
    #netbeans_jdkhome="/usr"
    netbeans_jdkhome="/usr/lib/jvm/java-8-openjdk-amd64"
    ` `
    # Additional module clusters:
    # using ${path.separator} (';' on Windows or ':' on Unix):
    #
    #netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"
  7. Finding the JDK dir location was not easy.
    In the end I made use of Synaptic to confirm exactly where the directory was:
  • find openjdk-8-jdk + Select
  • menu: Package ▸ Properties ▸ Installed Files
    (all located for me at: /usr/lib/jvm/java-8-openjdk-amd64)

Thus, the change to the .desktop launcher is:
`$ cat ~/.local/share/applications/netbeans-8.2.desktop | fgrep Exec
Exec=/bin/sh ~/netbeans/bin/netbeans –jdkhome /usr/lib/jvm/java-8-openjdk-amd64

Coda: Another Waste of Time

Netbeans does not seem to think that it needs to give much feedback whilst being used, so I’m pretty much in the dark after using it. Nevertheless, here is my experience:

  1. Checkout a SVN
    (same url as before)
    (NB auto-imported the ~/workspace/josm/core/netbeans project + 4 josm/plugins/ projects , but terracer was not one of them)
  2. Use (menu):File ▸ New Project
    (failed; I think that terracer is trying to use an old-format file, but the complete absence of feedback means I’m in the dark)

Gave up. Someone else will need to do this. I hope that you get better help than me.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Log in to leave a comment