diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/java/7 linking | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/java/7 linking')
4 files changed, 26 insertions, 0 deletions
diff --git a/meson/test cases/java/7 linking/com/mesonbuild/Linking.java b/meson/test cases/java/7 linking/com/mesonbuild/Linking.java new file mode 100644 index 000000000..170e2aadb --- /dev/null +++ b/meson/test cases/java/7 linking/com/mesonbuild/Linking.java @@ -0,0 +1,9 @@ +package com.mesonbuild; + +import com.mesonbuild.SimpleLib; + +class Linking { + public static void main(String [] args) { + SimpleLib.func(); + } +} diff --git a/meson/test cases/java/7 linking/meson.build b/meson/test cases/java/7 linking/meson.build new file mode 100644 index 000000000..0ae0db39a --- /dev/null +++ b/meson/test cases/java/7 linking/meson.build @@ -0,0 +1,8 @@ +project('linkingjava', 'java') + +subdir('sub') + +javaprog = jar('myprog', 'com/mesonbuild/Linking.java', + main_class : 'com.mesonbuild.Linking', + link_with : simplelib) +test('mytest', javaprog)
\ No newline at end of file diff --git a/meson/test cases/java/7 linking/sub/com/mesonbuild/SimpleLib.java b/meson/test cases/java/7 linking/sub/com/mesonbuild/SimpleLib.java new file mode 100644 index 000000000..835b2e4da --- /dev/null +++ b/meson/test cases/java/7 linking/sub/com/mesonbuild/SimpleLib.java @@ -0,0 +1,7 @@ +package com.mesonbuild; + +public class SimpleLib { + public static void func() { + System.out.println("Java linking is working.\n"); + } +} diff --git a/meson/test cases/java/7 linking/sub/meson.build b/meson/test cases/java/7 linking/sub/meson.build new file mode 100644 index 000000000..13fd202ed --- /dev/null +++ b/meson/test cases/java/7 linking/sub/meson.build @@ -0,0 +1,2 @@ +simplelib = jar('simplelib', + 'com/mesonbuild/SimpleLib.java') |