Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Java installation process enhancements#20

Merged
jabrena merged 2 commits intodevelopev3dev-lang-java/installer:developfrom
better_upgradeev3dev-lang-java/installer:better_upgradeCopy head branch name to clipboard
Apr 26, 2018
Merged

Java installation process enhancements#20
jabrena merged 2 commits intodevelopev3dev-lang-java/installer:developfrom
better_upgradeev3dev-lang-java/installer:better_upgradeCopy head branch name to clipboard

Conversation

@JakubVanek
Copy link
Contributor

Future possible improvements:

  • using the future java shell wrapper config files
  • using /usr/lib/jvm/.*.jinfo files for java alternative switching

@JakubVanek JakubVanek changed the title Make Java upgrade independent of platform and JDK version Java installation process enhancements Apr 21, 2018
@jabrena
Copy link
Member

jabrena commented Apr 23, 2018

Hi @JakubVanek

Is it possible if we merge this positive change in the next release?
I tested current code and If I merge, I will requiere few hours more.

Once we start the new iteration, I will merge on develop.

Is it ok for you?

Juan Antonio

@JakubVanek
Copy link
Contributor Author

It might be OK for me, but the previous update code is broken.

if type -p java; then
    echo "Found java executable in PATH"
    JAVA_REAL_EXE="$(which java)"

    if [ ! -d "$JRI_OPT/jri-10-build-050" ]; then
        echo "But we will upgrade the Java version"
        echo $JRI_OPT/jri-10-build-050
        echo
        if [ "$PLATFORM" == "ev3" ]; then
            java_install_bundle
        elif [ "$PLATFORM" == "brickpi"  ] ||
             [ "$PLATFORM" == "brickpi3" ] ||
             [ "$PLATFORM" == "pistorms" ]; then
            java_install_ppa
        fi
    else
      echo "Latest Java installed."
      echo $JRI_OPT/jri-10-build-050
    fi

elif ...

We don't have jri-10-build-050 on non-EV3 platforms.

@JakubVanek
Copy link
Contributor Author

This is another instance of broken code -- we're saying we're going to update, but nothing will happen.

elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
    echo "Found java executable in JAVA_HOME"
    JAVA_REAL_EXE="$JAVA_HOME/bin/java"

    echo $JRI_OPT/jri-10-build-050
    if [ ! -d "$JRI_OPT/jri-10-build-050" ]; then
        echo "But upgrading Java version"
        echo
    fi

else

@JakubVanek
Copy link
Contributor Author

I should've described what this patch does in more detail than "some enhancement", I'm sorry for that.

@jabrena
Copy link
Member

jabrena commented Apr 23, 2018

Oki, tomorrow, I will merge. :)

@jabrena
Copy link
Member

jabrena commented Apr 24, 2018

I will remove previous installation and I will tomorrow.
http://manpages.ubuntu.com/manpages/trusty/es/man8/update-alternatives.8.html

@jabrena
Copy link
Member

jabrena commented Apr 26, 2018

Merging

@jabrena jabrena merged commit a3edd52 into develop Apr 26, 2018
@JakubVanek JakubVanek deleted the better_upgrade branch November 4, 2018 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.