jpype icon indicating copy to clipboard operation
jpype copied to clipboard

OSX update search path

Open Thrameos opened this issue 8 years ago • 2 comments

I know this was reported previously, but one of my colleagues ran into it again and I don't see anything but work arounds in previous threads. I had her check the head and there has been no changes recently. The current order of seaching for the jvm is execute the linux search paths, then search for some pre 1.7 install, then use the java_home executable.

There are three issues:

  1. Most people don't want the old 1.6 if it exists on the system. The only work around is to use JAVA_HOME which is searched earlier. It seems like the old 1.6 pattern should be the pattern of last resort.
  2. The java_home search uses a pattern that takes the first 4 characters and compares the version to determine if java_home exists on system. This causes the "10.12.5" to get mapped into "10.1" which is less than "10.6" and thus the test fails. Obviously a better pattern is to use a split and grab the first 2 numbers.
  3. Switching the order even after changing that did not work. I am unclear as to why it failed as I was just debugging someone's install. It appears that the pattern gave the wrong directory which was causing an exception.

Unfortunately, I don't have access to OSX machine to try to correct these issues. I can submit a patch for the first two issues, but the third is not possible currently.

Thrameos avatar Sep 19 '17 20:09 Thrameos

thanks for the report. We are testing on OSX (travis), if I'm not mistaken.

marscher avatar Sep 19 '17 20:09 marscher

I would guess the travis build is getting one of the earlier search patterns rather than the last. I suppose I could try to deliberately force the search order to hit the suspected problem which would cause the travis build to break in a branch. If we can replicate the error then we should be able to resolve it pretty quickly.

I will try to submit a pull request to expose the bug later this week.

Thrameos avatar Sep 19 '17 20:09 Thrameos