Skip to content

Commit 3b40f86

Browse files
authored
doc: update Java interop document (#5783)
Pure Dart binding is now standard This page needs to be updated so that newcomers are not confused - Upgrade JNIGEN to v0.9.0 - Remove legacy C bindings HosseinYousefi/jnigen_example#2
1 parent 9bf986b commit 3b40f86

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/content/interop/java-interop.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ that uses `package:jnigen` to generate bindings for a simple class.
3737

3838
- JDK
3939
- [Maven][]
40-
- (Optional) [`clang-format`][] to format the generated C bindings
4140

4241
[Maven]: https://maven.apache.org/
43-
[`clang-format`]: https://clang.llvm.org/docs/ClangFormat.html
4442

4543
### Configure `jnigen`
4644

@@ -56,9 +54,6 @@ This file contains the configuration for generating the bindings.
5654

5755
```yaml
5856
output:
59-
c:
60-
library_name: example
61-
path: src/example/
6257
dart:
6358
path: lib/example.dart
6459
structure: single_file
@@ -69,7 +64,7 @@ classes:
6964
- 'dev.dart.Example'
7065
```
7166
72-
`path` specifies the path for the generated `c` and `dart` bindings.
67+
`path` specifies the path for the generated `dart` bindings.
7368

7469
`source_path` specifies the path of the Java source file that
7570
you want to generate bindings for,
@@ -90,7 +85,7 @@ public class Example {
9085

9186
### Generate the Dart bindings
9287

93-
To generate the Dart (and C) bindings, run `jnigen` and
88+
To generate the Dart bindings, run `jnigen` and
9489
specify the config file using the `--config` option:
9590

9691
```console
@@ -120,11 +115,11 @@ print(Example.sum(a, b));
120115
### Run the example
121116

122117
Before running the example,
123-
you must build the dynamic libraries for `jni` and the generated C files.
118+
you must build the dynamic library for `jni`.
124119
The Java sources also must be compiled. To do so, run:
125120

126121
```console
127-
$ dart run jni:setup -p jni -s src/example
122+
$ dart run jni:setup
128123
$ javac java/dev/dart/Example.java
129124
```
130125

0 commit comments

Comments
 (0)