@@ -95,10 +95,6 @@ There is also another option `arrow-memory-netty`. You can read more about Apach
95
95
<package >pandas</package > <!-- ② -->
96
96
<package >pyarrow</package > <!-- ③ -->
97
97
</packages >
98
- <pythonHome >
99
- <includes ></includes >
100
- <excludes >.*</excludes >
101
- </pythonHome >
102
98
</configuration >
103
99
<goals >
104
100
<goal >process-graalpy-resources</goal >
@@ -212,6 +208,8 @@ Bind the Java interface to the Python module.
212
208
` Main.java `
213
209
214
210
``` java
211
+ private static DataAnalysisPyModule dataAnalysisPyModule;
212
+
215
213
public static void initDataAnalysisPyModule(Context context) {
216
214
Value value = context. eval(" python" , " import data_analysis; data_analysis" );
217
215
dataAnalysisPyModule = value. as(DataAnalysisPyModule . class);
@@ -252,6 +250,11 @@ Finally, use the setup in your main method:
252
250
253
251
` Main.java `
254
252
``` java
253
+ private static final String PYTHON_URL = " https://www.graalvm.org/compatibility/module_results/python-module-testing-v241.csv" ;
254
+ private static final String JAVASCRIPT_URL = " https://www.graalvm.org/compatibility/module_results/js-module-testing.csv" ;
255
+ private static final Integer PASSING_RATE_COLUMN_INDEX = 3 ;
256
+
257
+
255
258
public static void main(String [] args) throws IOException , InterruptedException {
256
259
try (Context context = initContext();
257
260
BufferAllocator allocator = new RootAllocator ();
285
288
./gradlew build
286
289
```
287
290
288
- To run the application:
291
+ To run the application using Maven, first define ` exec ` plugin:
292
+
293
+ ` pom.xml `
294
+ ``` xml
295
+ <plugin >
296
+ <groupId >org.codehaus.mojo</groupId >
297
+ <artifactId >exec-maven-plugin</artifactId >
298
+ <version >1.2.1</version >
299
+ <executions >
300
+ <execution >
301
+ <goals >
302
+ <goal >java</goal >
303
+ </goals >
304
+ </execution >
305
+ </executions >
306
+ <configuration >
307
+ <mainClass >com.example.Main</mainClass >
308
+ </configuration >
309
+ </plugin >
310
+ ```
311
+ Run the application using:
289
312
``` bash
290
313
./mvnw exec:java -Dexec.mainClass=" com.example.Main"
291
314
```
0 commit comments