0

I have recently removed my java-8 JDK and installed AdoptOpenJDK11 via brew. I run sbt immediately after, and receive the following horrendous error:

java.lang.UnsatisfiedLinkError: 
/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna- 
674908859/jna13937388295933725976.tmp: 
dlopen(/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna-674908859/jna13937388295933725976.tmp, 1): no suitable image found.  Did find:
[error]      
/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna- 
674908859/jna13937388295933725976.tmp: code signature in 
(/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna- 
674908859/jna13937388295933725976.tmp) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

After some research, the closest question I found was :

JNA UnsatisfiedLinkError - works when I set java.library.path to a bogus value

Which suggested an older version of jna may be present on my machine. I did a grep across my computer for the jna.jar file that should supposedly exist, but found nothing.

I also suspected there may be a leftover env variable linking to some old java-8 directory, but saw nothing in printenv. Any assistance would be greatly appreciated, thanks!

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
Michael
  • 343
  • 3
  • 13
  • Did you make sure your version of scala/sbt is compatible with jdk11? https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html. You may also want to look at this (slightly) [similar](https://stackoverflow.com/questions/47322598/does-sbt-support-java-9) question – smac89 Aug 16 '19 at 03:23
  • Did all the checks above and turns out it was the AdoptOpenJDK version. Reverted and now everything works fine. Thanks a ton! – Michael Aug 17 '19 at 17:26

0 Answers0