mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
19 lines
388 B
Markdown
19 lines
388 B
Markdown
# java
|
|
|
|
> Java Application Launcher.
|
|
|
|
- Execute a java .class file that contains a main method by using just the class name:
|
|
|
|
`java {{filename}}`
|
|
|
|
- Execute a .jar program:
|
|
|
|
`java -jar {{filename.jar}}`
|
|
|
|
- Display JDK, JRE and HotSpot versions:
|
|
|
|
`java -version`
|
|
|
|
- Custom input and output files. Preferably .txt files:
|
|
|
|
`java {{classname}} <{{path/to/inputfile}}> {{path/to/outputfile}}`
|