-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Darwin support for Java examples (#25290)
When testing the `darwin-arm64-java-matter-controller` target, I found that the Java examples were not compatible with OSX. It appeared that only Linux environment had been configured and support for the Java packages. JDK8 was required to avoid compilation warnings (that became errors) related to the deprecation of `finalize()`. When building for Darwin arm64, the resulting shared object was compiled for "Mach-O 64-bit dynamically linked shared library arm64". To successfully run the project I was required to use a java runtime that was compiled for the same architecture. https://corretto.aws/downloads/latest/amazon-corretto-8-aarch64-macos-jdk.pkg * Build Projects ``` source ./scripts/activate.sh export JAVA_PATH=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/ export PATH=$JAVA_PATH/bin:$PATH ./scripts/build/build_examples.py --target darwin-arm64-java-matter-controller build ./scripts/build/build_examples.py --target darwin-arm64-chip-tool build ./scripts/build/build_examples.py --target darwin-arm64-all-clusters build ``` * Terminal 1 ``` cd out/darwin-arm64-all-clusters/ rm /tmp/chip* ./chip-all-clusters-app ``` * Terminal 2 ``` cd out/darwin-arm64-java-matter-controller/ java -verbose:jni -Xcheck:jni -Djava.library.path=lib/jni/ \ -jar bin/java-matter-controller \ pairing onnetwork-long 1 20202021 3840 1000 ```
- Loading branch information
1 parent
c505d32
commit b3b0770
Showing
3 changed files
with
44 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters