eclipse-archived / triquetrum

Triquetrum project
Other
13 stars 14 forks source link

macOS: The JVM shared library ... does not contain the JNI_CreateJavaVM symbol #358

Closed cxbrooks closed 4 years ago

cxbrooks commented 4 years ago

When I download the 0.4.0M1 macOS zip file, unzip and run

open triquetrum-0.4.0M1.app

a dialog pops up that states:

The JVM shared library "/Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home/bin/..lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol.

This seems to be a signing problem. I saw a similar issue earlier with the 0.3.1 installer.

cxbrooks commented 4 years ago

My changes fixed the issue, here are some notes about the solution:

macOS signing To sign the macOS executables use the eclipse-macsigner-plugin

<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-macsigner-plugin</artifactId>
<version>${cbi-version}</version>
<executions>
<execution>
<id>sign</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<configuration>
<signFiles>
<signFile>${project.build.directory}/products/${product-folder}/macosx/cocoa/x86_64/Eclipse.app</signFile>
</signFiles>
<timeoutMillis>300000</timeoutMillis> 
<continueOnFail>${macSigner.forceContinue}</continueOnFail>
<entitlements>${project.basedir}/application.entitlement</entitlements>
</configuration>
</execution>
</executions>
</plugin>

Entitlements The security guidelines for macOS application development requires the definition of Entitlements to grant an executable permission to use a service or technology. The entitlements used by the Eclipse Platform are defined here

So, it would seem that the solution is to update the cbi version number and to add an entitlement file.