Javet icon indicating copy to clipboard operation
Javet copied to clipboard

Version error of dylib in macos

Open wuruofeng opened this issue 1 year ago • 1 comments

Hello~ I have a library that contains Javet and deploy it to maven's private repository, here is its pom.xml:

    <dependency>
        <groupId>com.caoccao.javet</groupId>
        <artifactId>javet</artifactId>
        <version>1.1.5</version>
    </dependency>

    <!-- macOS (x86_64 and arm64) -->
    <dependency>
        <groupId>com.caoccao.javet</groupId>
        <artifactId>javet-macos</artifactId>
        <version>1.1.0</version>
    </dependency>

My question is that when I use this library in my mac environment, the Javet seems to found the wrong version of the dylib

console shows "Javet library /libjavet-v8-macos-x86_64.v.1.1.5.dylib is not found"

Obviously, the mac environment version should be 1.1.0 instead of 1.1.5

where goes wrong?

image image image

wuruofeng avatar Jul 19 '22 02:07 wuruofeng

In general, you need to create multiple profiles which apply different set of config per OS. The pom.xml you posted only loads the first library which is v1.1.5. The second library is refused by JVM.

Please refer to this sample for detail.

caoccao avatar Jul 19 '22 03:07 caoccao

I am getting this error as well for version 3.0.2, which versions are compatible with macos?

gaberogan avatar Jan 04 '24 20:01 gaberogan

Please check this doc out. All versions are compatible with MacOS.

caoccao avatar Jan 04 '24 23:01 caoccao