aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/java_module.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/markdown/snippets/java_module.md b/docs/markdown/snippets/java_module.md
new file mode 100644
index 0000000..b806aee
--- /dev/null
+++ b/docs/markdown/snippets/java_module.md
@@ -0,0 +1,18 @@
+## Java Module
+
+The Java module has been added to Meson. The Java module allows users to
+generate native header files without needing to use a `custom_target()`.
+
+```meson
+jmod = import('java')
+
+native_header = jmod.generate_native_header('File.java', package: 'com.mesonbuild')
+native_header_includes = include_directories('.')
+
+jdkjava = shared_module(
+ 'jdkjava',
+ [native_header_includes, other_sources],
+ dependencies : [jdk],
+ include_directories : [native_header_includes]
+)
+```