Skip to content

Commit

Permalink
Address the review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Nov 20, 2022
1 parent 85d4974 commit ad18034
Showing 3 changed files with 7 additions and 17 deletions.
6 changes: 6 additions & 0 deletions examples/java-matter-controller/README.md
Original file line number Diff line number Diff line change
@@ -84,3 +84,9 @@ the top Matter directory:

The Java executable file `java-matter-controller` will be generated at
`out/android-x86-java-matter-controller/bin/`

Run the java-matter-controller

```
java -Djava.library.path=../lib/jni -jar java-matter-controller
```
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@
import com.matter.controller.commands.common.*;
import com.matter.controller.commands.discover.*;
import com.matter.controller.commands.pairing.*;
import java.lang.reflect.Field;
import java.util.ArrayList;

public class Main {
@@ -85,21 +84,6 @@ private static void registerCommandsPairing(
}

public static void main(String[] args) {
System.setProperty("java.library.path", "../lib/jni");

Field fieldSysPath = null;
try {
fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths");
} catch (NoSuchFieldException e) {
throw new RuntimeException(e);
}
fieldSysPath.setAccessible(true);
try {
fieldSysPath.set(null, null);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}

ChipDeviceController controller =
new ChipDeviceController(
ControllerParams.newBuilder()
2 changes: 1 addition & 1 deletion scripts/build/builders/host.py
Original file line number Diff line number Diff line change
@@ -432,7 +432,7 @@ def PostBuildCommand(self):
self._Execute(['genhtml', os.path.join(self.coverage_dir, 'lcov_final.info'), '--output-directory',
os.path.join(self.coverage_dir, 'html')], title="HTML coverage")

if self.app.ExamplePath() == "java-matter-controller" and 'JAVA_PATH' in os.environ:
if self.app == HostApp.JAVA_MATTER_CONTROLLER:
self.createJavaExecutable("java-matter-controller")

def build_outputs(self):

0 comments on commit ad18034

Please sign in to comment.