OpenJDK: Difference between revisions
→Usage
m (Special:WantedCategories ?) |
(→Usage) |
||
Line 10:
== Usage ==
OpenJDK is a set of command-line tools.
If OpenJDK is installed in <
The two most important tools are the [[javac]] compiler, and the java runner.
This example program would compute 12 - 4.
<syntaxhighlight lang="java">
public class TwelveMinusFour {
public static void main(String[] args) {
System.out.println(12 - 4);
}
}
</syntaxhighlight>
One can compile this program with <kbd>javac</kbd>, and run it with <kbd>java</kbd>.
<syntaxhighlight lang="bash">
$
$ java TwelveMinusFour
8
</syntaxhighlight>
== References ==
|