Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenJump [GIS]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 483
Location: Salem, OR

PostPosted: Sun May 03, 2015 8:18 pm    Post subject: OpenJump [GIS] Reply with quote

There's a great tool that is java based for dealing with maps and matters of geogaphic information systems ("GIS"), it is called OpenJump. I've been using it for years on a Windows desktop tying it into my postgreSQL/postGIS database to create maps and do interesting things.

Recently I have had to work from a Genoo based laptop, so I went about installing OpenJump and found it did not work straight out of the box. Below are steps I took to get it to work on my system:

Select which Java environment I'll run in with "eselect java-vm".

Downloaded the jar file, OpenJUMP-Installer-1.8.0-r4164-PLUS.jar, from https://sourceforge.net/projects/jump-pilot/files/OpenJUMP/1.8.0/

Run the install with:
Code:
java -jar OpenJUMP-Installer-1.8.0-r4164-PLUS.jar


I found that after the installation, the start icon placed in my menu (XFCE) caused a terminal window to start up saying it could not find my java. After searching about and studying the matter, I decided upon this fix to get OpenJump to play nicely with Gentoo's selectable Java paradigm. I inserted this script snippit into /usr/local/OpenJUMP-1.8.0-r4164-PLUS/bin/oj_linux.sh:

Insert after the remm'd line for setting JAVA_HOME:
Code:
#
# What brand of Linux are we in?
#
RELEASE=`cat /etc/*-release`
if [[ $RELEASE =~ "Gentoo" ]]; then
    echo "This is a Gentoo-based Linux, so using selected java:"
    #
    # first check if user has overriden system designation
    # user may not have specified, so it could be nonexistent
    #
    CURRENT_VM=`readlink -f ~/.gentoo/java-config-2/current-user-vm`

    if [[ $CURRENT_VM == "" ]]; then
        #
        # Gentoo has a configurable/selectable Java environment
        # managed by the link current-system-vm, so read where
        # the link currently points to
        #
        CURRENT_VM=`readlink -f /etc/java-config-2/current-system-vm`
        echo Using system java setting
   else
        echo Using user\'s java setting
   fi

   JAVA_HOME=$CURRENT_VM
   echo "  setting JAVA_HOME to: $JAVA_HOME"
fi


I've alerted the developers and am engaged in a discussion about whether they should adopt my snippet into their script, see https://sourceforge.net/p/jump-pilot/feature-requests/221/

I hope this helps someone and saves time. OpenJump is a great tool and I watch the project with great interest.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum