github.com/jmitchell/nomad@v0.1.3-0.20151007230021-7ab84c2862d8/website/source/docs/drivers/java.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Drivers: Java" 4 sidebar_current: "docs-drivers-java" 5 description: |- 6 The Java task driver is used to run Jars using the JVM. 7 --- 8 9 # Java Driver 10 11 Name: `java` 12 13 The `Java` driver is used to execute Java applications packaged into a Java Jar 14 file. The driver currently requires the Jar file be accessible via 15 HTTP from the Nomad client. 16 17 ## Task Configuration 18 19 The `java` driver supports the following configuration in the job spec: 20 21 * `jar_source` - **(Required)** The hosted location of the source Jar file. Must be accessible 22 from the Nomad client, via HTTP 23 24 * `args` - (Optional) The argument list for the `java` command, space separated. 25 26 ## Client Requirements 27 28 The `java` driver requires Java to be installed and in your systems `$PATH`. 29 The `jar_source` must be accessible by the node running Nomad. This can be an 30 internal source, private to your cluster, but it must be reachable by the client 31 over HTTP. 32 33 ## Client Attributes 34 35 The `java` driver will set the following client attributes: 36 37 * `driver.java` - Set to `1` if Java is found on the host node. Nomad determines 38 this by executing `java -version` on the host and parsing the output 39 * `driver.java.version` - Version of Java, ex: `1.6.0_65` 40 * `driver.java.runtime` - Runtime version, ex: `Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)` 41 * `driver.java.vm` - Virtual Machine information, ex: `Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)` 42 43 ## Resource Isolation 44 45 The resource isolation provided varies by the operating system of 46 the client and the configuration. 47 48 On Linux, Nomad will attempt to use cgroups, namespaces, and chroot 49 to isolate the resources of a process. If the Nomad agent is not 50 running as root many of these mechanisms cannot be used. 51 52 As a baseline, the Java jars will be ran inside a Java Virtual Machine, 53 providing a minimum amount of isolation. 54