Opened 3 years ago

Closed 3 years ago

#1783 closed defect (fixed)

Can not upgrade to 0.9.25 on OSX

Reported by: lunokhod Owned by:
Priority: major Milestone: 0.9.26
Component: installer Version: 0.9.25
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

I have been using I2P on OSX for a long time and have never had any problems upgrading when a new version comes out. Now, however, in the i2p console, I am getting the following message:

Update available: Version 0.9.25
Requires Java version 1.7 but installed Java version is 1.6.0_65

I don't understand this, because I have Java version 1.8 installed!

First of all, at the terminal, "which java" gives me this location for the binary, which is the system default: /usr/bin/java

Second, java -version gives: java version "1.8.0_71"

Third, the system preferences java control panel says that I am using "Java 8 update 77"

I have no idea where "Java 6" might be installed on my machine. I have also looked to see if there was any "JAVA_HOME" variable defined in my login shell, but I didn't see anything.

Any help would be greatly appreciate!

Lunokhod

Subtickets

#1784: More info on OS X Java problems...closed

Change History (4)

comment:1 Changed 3 years ago by zzz

Status: newopen

Seems to be a common problem with Mac users.

I found the following in the 'i2prouter' script, perhaps it's a clue:

# OSX always places Java in the same location so we can reliably set JAVA_HOME
if [ "$DIST_OS" = "macosx" ]
then
    if [ -z "$JAVA_HOME" ]; then
        JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
    fi
fi

comment:2 Changed 3 years ago by zzz

Add a subticket #1784.

comment:3 Changed 3 years ago by zzz

Milestone: undecided0.9.26

http://stackoverflow.com/questions/15826202/where-is-java-installed-on-mac-os-x
http://stackoverflow.com/questions/18144660/what-is-path-of-jdk-on-mac
http://stackoverflow.com/questions/6141180/mac-os-x-10-6-7-java-path-current-jdk-confusing
https://developer.apple.com/library/mac/qa/qa1170/_index.html

Alias to current java version is /Library/Java/Home? but "This link only exists for legacy purposes, and will not be updated by installing Java 7. Do not use this path."

"The location has changed from Java 6 (provided by Apple) to Java 7 and onwards (provided by Oracle). The best generic way to find this out is to run

/usr/libexec/java_home

This is the natively supported way to find out both the path to the default Java installation as well as all alternative ones present."

comment:4 Changed 3 years ago by zzz

Resolution: fixed
Status: openclosed

In 53b8f66487fee0aa4e9c59a4a60c39b199e017fe to be 0.9.25-11, new installs only.

Simple fix for existing installs (OS X 10.5 or later): in i2prouter, change the line

        JAVA_HOME="/Library/Java/Home"; export JAVA_HOME

to

        JAVA_HOME=`/usr/libexec/java_home`; export JAVA_HOME
Note: See TracTickets for help on using tickets.