Files
tldr/pages/common/java.md
2017-12-30 21:37:37 -07:00

20 lines
547 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# java
> Java Application Launcher.
- Execute a java .class file that contains a main method by using just the class name:
`java {{classname}}`
- Custom input and output files. Preferably .txt files. This is useful when you dont want to input from keyboard every time you run your class. Outputs from `System.out.println();` are saved in the output file:
`java {{classname}} <{{path/to/inputfile}}> {{path/to/outputfile}}`
- Execute a .jar program:
`java -jar {{filename.jar}}`
- Display JDK, JRE and HotSpot versions:
`java -version`