From b371875e02cce2fb3fbb9fbb8f07eb5817ae0e8f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 29 Mar 2017 15:03:43 -0300 Subject: docs: Import the website and wiki and build with hotdoc This allows us to more easily have the documentation in sync with the source code as people will have to document new features etc right at the time where they implement it. --- docs/markdown/Java.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/markdown/Java.md (limited to 'docs/markdown/Java.md') diff --git a/docs/markdown/Java.md b/docs/markdown/Java.md new file mode 100644 index 000000000..8501bdfe0 --- /dev/null +++ b/docs/markdown/Java.md @@ -0,0 +1,22 @@ +--- +title: Java +... + +# Compiling Java applications + +Meson has experimental support for compiling Java programs. The basic syntax consists of only one function and would be used like this: + +```meson +project('javaprog', 'java') + +myjar = jar('mything', 'com/example/Prog.java', + main_class : 'com.example.Prog') + +test('javatest', myjar) +``` + +However note that Meson places limitations on how you lay out your code. + +* all Java files for a jar must be under the subdirectory the jar definition is in +* all Java files must be in paths specified by their package, e.g. a class called `com.example.Something` must be in a Java file situated at `com/example/Something.java`. +* Meson only deals with jar files, you cannot poke individual class files (unless you do so manually) -- cgit v1.2.3