Opened 12 months ago

Last modified 3 months ago

#2299 assigned defect

Incompatible with OSX High Sierra / Java 10.0.2

Reported by: jogger Owned by: Meeh
Priority: major Milestone: 0.9.41
Component: installer Version: 0.9.36
Keywords: Cc:
Parent Tickets: Sensitive: no


With High Sierra Java is at /Library/Internet?\ Plug-Ins/JavaAppletPlugin?.plugin/Contents/Home/bin/java

Bug 1: gets this wrong due to a simple quoting error omitting the backslash, thus running an outdated java version as described below. Correct script adding \ and " :

JAVA=$(which /Library/Internet?\ Plug-Ins/JavaAppletPlugin?.plugin/Contents/Home/bin/java
which java)
if [ -z "$JAVA" ]
[ ! -x "$JAVA" ]; then

echo "Error: Cannot find java." >&2
exit 1


for jar in ls ${I2P}/lib/*.jar; do

if [ ! -z $CP ]; then






if [ $(uname -s) = "Darwin" ]; then

export JAVA_TOOL_OPTIONS="-Djava.awt.headless=true"

JAVAOPTS="${MAXMEMOPT}${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride?=logs/log-router-@.txt"

nohup "${JAVA}" -cp \"${CP}\" ${JAVAOPTS} net.i2p.router.RouterLaunch? > /dev/null 2>&1

) &

Bug 2:

The java command issued by the wrapper starts a random outdated Java (I found 1.8.0_25, 9.0.1 and 9.0.4 on different machines) that has been left over from earlier OS installs, it is one of those listed by "/usr/libexec/java_home -V"

The correct way to start an application on OSX is to use the open command, e.g. "open test.jar" instead of "java -jar test.jar". The "open" command will find the correct Java, while "java" does not.

This can not be fixed by simply adding "export JAVA_HOME="/Library/Internet? Plug-Ins/JavaAppletPlugin?.plugin/Contents/Home"" to the "i2prouter" script within the "Start I2P Router" application. Java 10 does not like the "-d64" option used.


Change History (4)

comment:1 Changed 12 months ago by zzz

Component: router/generalinstaller
Milestone: undecided0.9.37
Owner: set to Meeh
Status: newassigned

comment:2 Changed 12 months ago by jogger

I was able to get the above fix (export JAVA_HOME) to work by setting autobits to false in wrapper.config.


  • Successfully upgraded to wrapper 3.5.55 in the process.
  • i2p performance is awful with on OSX. Watchdog barking all the time.
  • On OSX my torrents (residing on SD card) are wrecked every time I shut i2p down. Everything rescanned every time, sometimes data corrupted.

comment:3 Changed 3 months ago by Meeh

Owner: changed from Meeh to zzz

@zzz: Should we still patch on the old install system on OSX, or ask people to move to OSX Launcher?

comment:4 Changed 3 months ago by zzz

Milestone: 0.9.370.9.41
Owner: changed from zzz to Meeh

@meeh the bugs in the OP sound like easy things to change and test, so I suggest you do that for .41 = it could be useful for people building local installers, even if we do change the recommendation on our download page. I don't think we're ready yet to abandon the old installer completely.

Officially moving to the OSX launcher probably requires a meeting sometime, let's not do that discussion in this ticket.

Note: See TracTickets for help on using tickets.