Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for MacOS (Apple Silicon, M1) architecture (j2v8_macosx_armv7l). #556

Open
alexvfrolov opened this issue Apr 23, 2021 · 4 comments

Comments

@alexvfrolov
Copy link

Hi,

In our JVM-based project, we are using the J2V8 library. Here are the Maven dependencies we are using:

            <dependency>
                <groupId>com.eclipsesource.j2v8</groupId>
                <artifactId>j2v8_linux_x86_64</artifactId>
                <version>4.6.0</version>
            </dependency>
            <dependency>
                <groupId>com.eclipsesource.j2v8</groupId>
                <artifactId>j2v8_win32_x86_64</artifactId>
                <version>4.6.0</version>
            </dependency>
            <dependency>
                <groupId>com.eclipsesource.j2v8</groupId>
                <artifactId>j2v8_macosx_x86_64</artifactId>
                <version>4.6.0</version>
            </dependency>

But since Apple build its new MacBooks on the M1 chips, we faced the problem in developing the application.

Caused by: java.lang.IllegalStateException: J2V8 native library not loaded
Caused by: java.lang.UnsatisfiedLinkError: 
Could not load J2V8 library. Reasons: 
	no j2v8_macosx_armv7l in java.library.path

Are there any plans to provide builds for this architecture, or is it possible to build the library on such a machine? We can do build for our own, but we need help with how to do this.

Thanks.

@ahmadov
Copy link
Contributor

ahmadov commented Aug 10, 2021

Hello @alexvfrolov, since we dropped the support for macOS, J2V8 does not provide a build for macOS but of course, you can build the J2V8 on your machine for macOS. I did some experiments on how we can enable it for macOS again. Please refer that branch to see what should be done: https://github.com/eclipsesource/J2V8/tree/macos_build

@CodeMokee
Copy link

CodeMokee commented Mar 29, 2023

There is a workaround for the m1 j2v8, as we know, apple has Rosetta to run the apps build for x64 intel chip, we can use the x64 version JDK and let it run with Rosetta 2 to emulate the x64 to run the java program in M1 series chip to address this issue.

@ronamir1
Copy link

ronamir1 commented Aug 8, 2023

There is a workaround for the m1 j2v8, as we know, apple has Rosetta to run the apps build for x64 intel chip, we can use the x64 version JDK and let it run with Rosetta 2 to emulate the x64 to run the java program in M1 series chip to address this issue.

Can you elaborate, I’ve installed Rosetta but still get this error.

@CodeMokee
Copy link

CodeMokee commented Aug 8, 2023

@ronamir1 do you have replace the JDK to a x64 version?
for example:
image
As shown in the picture, the jdk with aarch64 suffix is for apple chip, and the other for intel x64, you should download a x64 jdk and keep sure your codes running on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants