You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create a Java application with Gradle using the provided command and follow the prompts (select a build script language, selectatest framework, etc.):
72
+
1. Create a Java application with Gradle using the commandbelow and follow the prompts (select a build script language, selectatest framework, and so on):
49
73
```bash
50
74
gradle init --type java-application \
51
75
--project-name interop \
@@ -116,6 +140,53 @@ The Java code and the _pom.xml_ file are heavily documented and the generated co
116
140
117
141
> Note: The performance of the GraalPy runtime depends on the JDK in which you embed it. For more information, see [Runtime Optimization Support](https://www.graalvm.org/latest/reference-manual/embed-languages/#runtime-optimization-support).
118
142
143
+
## Ant, CMake, Makefile or Other Build Systems Without Direct Support for Maven Dependencies
144
+
145
+
Some (often older) projects may be using Ant, Makefiles, CMake, or other build systems that do not directly support Maven dependencies.
146
+
Projects such as [Apache Ivy™](https://ant.apache.org/ivy/history/master/tutorial/start.html) enable such build systems to resolve Maven dependencies, but developers may have reasons not to use them.
147
+
GraalPy comes with a tool to obtain the required JAR files from Maven.
148
+
149
+
1. Assuming there is some directory where third-party dependencies are stored for the project and that the build system is set up to put any JAR files there on the classpath, the project directory tree might look similar to this:
150
+
151
+
```
152
+
├───lib
153
+
│ └─── ... *.jar dependencies are here
154
+
└───src
155
+
└─── ... *.java files and resources are here
156
+
```
157
+
158
+
2. [Install GraalPy](Python-Runtime.md#installing-graalpy) for your system and ensure you have `graalpy` on your `PATH`.
159
+
Open a command-line interface and enter your project directory.
160
+
Then, as appropriate for your system, run one of the following commands:
&"$GRAALPY_HOME/libexec/graalpy-polyglot-get" -a python -o lib -v "24.0.0"
172
+
```
173
+
174
+
These commands download all GraalPy dependencies into the _lib_ directory.
175
+
176
+
3. Provided that your build system is set up to pick up the JAR files from _lib_, the GraalPy embedding code below should work if put in an appropriate place in the project to run as the main class.
0 commit comments