Opened 7 months ago

Last modified 7 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.37
Component: installer Version: 0.9.36
Keywords: Cc:
Parent Tickets:


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.

Subtickets (add)

Change History (2)

comment:1 Changed 7 months ago by zzz

  • Component changed from router/general to installer
  • Milestone changed from undecided to 0.9.37
  • Owner set to meeh
  • Status changed from new to assigned

comment:2 Changed 7 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.
Note: See TracTickets for help on using tickets.