Skip to content

Commit d76dc0b

Browse files
committed
Native example app for Linux
1 parent c03c470 commit d76dc0b

File tree

2 files changed

+133
-1
lines changed

2 files changed

+133
-1
lines changed

examples/enumerate_native/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,27 @@ this _Java Does USB_ library.
1010

1111
- [GraalVM](https://www.graalvm.org/) 25 or higher
1212
- [Maven](https://maven.apache.org/) 3.9 or higher
13+
- Latest snapshot of _Java Does USB_
14+
15+
16+
#### Java Does USB Snapshot
17+
18+
Check out the latest version of _Java Does USB_ and build it:
19+
20+
```shell
21+
git clone https://github.com/manuelbl/JavaDoesUSB.git
22+
cd JavaDoesUSB/java-does-usb
23+
mvn clean install -DskipTests
24+
```
25+
26+
The installation requires a valid GPG key pair. If you don't have one,
27+
create it with and do not set a password:
28+
29+
```shell
30+
gpg --gen-key
31+
```
32+
33+
The full name and email address can be anyone's.
1334

1435

1536
### Preparation
@@ -26,7 +47,7 @@ Args = --enable-native-access=ALL-UNNAMED -H:ConfigurationFileDirectories=config
2647
```
2748

2849
Note the last word of the line. In this case, it is `macos`. Change this to
29-
`linux` or `windows` if needed. (Windows and Linux are yet to come.)
50+
`linux` or `windows` if needed. (Windows is yet to come.)
3051

3152
In your own Maven project, you might also need to move the file or rather rename
3253
directory. It must be named according to the pattern
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"foreign": {
3+
"downcalls": [
4+
{
5+
"returnType": "jint",
6+
"parameterTypes": [
7+
"void*",
8+
"void*"
9+
]
10+
},
11+
{
12+
"returnType": "jint",
13+
"parameterTypes": [
14+
"void*",
15+
"void*",
16+
"void*"
17+
]
18+
},
19+
{
20+
"returnType": "jint",
21+
"parameterTypes": [
22+
"jint",
23+
"jlong",
24+
"void*"
25+
],
26+
"options": {
27+
"captureCallState": true,
28+
"firstVariadicArg": 2
29+
}
30+
},
31+
{
32+
"returnType": "jint",
33+
"parameterTypes": [
34+
"jint"
35+
]
36+
},
37+
{
38+
"returnType": "void*",
39+
"parameterTypes": [
40+
"void*"
41+
]
42+
},
43+
{
44+
"returnType": "jint",
45+
"parameterTypes": [
46+
"jint",
47+
"void*",
48+
"jint",
49+
"jint"
50+
],
51+
"options": {
52+
"captureCallState": true
53+
}
54+
},
55+
{
56+
"returnType": "void*",
57+
"parameterTypes": []
58+
},
59+
{
60+
"returnType": "jint",
61+
"parameterTypes": [
62+
"jint"
63+
],
64+
"options": {
65+
"captureCallState": true
66+
}
67+
},
68+
{
69+
"returnType": "jint",
70+
"parameterTypes": [
71+
"void*",
72+
"jint"
73+
],
74+
"options": {
75+
"captureCallState": true
76+
}
77+
},
78+
{
79+
"returnType": "void*",
80+
"parameterTypes": [
81+
"void*",
82+
"void*"
83+
]
84+
},
85+
{
86+
"returnType": "void*",
87+
"parameterTypes": [
88+
"jint"
89+
]
90+
},
91+
{
92+
"returnType": "jint",
93+
"parameterTypes": [
94+
"void*"
95+
]
96+
},
97+
{
98+
"returnType": "jint",
99+
"parameterTypes": [
100+
"jint",
101+
"jint",
102+
"jint",
103+
"void*"
104+
],
105+
"options": {
106+
"captureCallState": true
107+
}
108+
}
109+
]
110+
}
111+
}

0 commit comments

Comments
 (0)