The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
780 B
22 lines
780 B
--- |
|
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)
|
|
|