Java
On this page
This plugin provides the Java programming languages to nitto.
To enable this plugin, put plugin "java"
at the top of your buildfile.
Using java
To use java in a target, you need to set the language: lang "java"
.
When building a binary (e.g. type "bin"
), then you also need to set a mainclass for the resulting jar file: java main "xxx"
; see below for more informations.
Commands
The java plugin only adds one command: java
, but it’s very versatile in how it is used: it’s first parameter denotes what the command will be doing:
main
Sets the mainpackage; for example: java main "mypackage.Main"
to set the mainclass to mypackage.Main
or mypackage/Main.java
.
Arguments | |||
---|---|---|---|
# | Name | Type | Info |
0 |
classname
|
str
|
Expanded?: ❌ |
sealpkg
Adds a package to the list of sealed packages.
Arguments | |||
---|---|---|---|
# | Name | Type | Info |
0 |
package
|
str
|
Package path needs to use the "/" delimiter instead of the normal "." Expanded?: ❌ |
Toolchains
The java plugin uses toolchains to get various binaries it needs to call:
javac
: the java compiler