mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 10:22:08 +02:00

Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com> Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
24 lines
543 B
Markdown
24 lines
543 B
Markdown
# java
|
|
|
|
> Java Application Launcher.
|
|
> More information: <https://java.com>.
|
|
|
|
- Execute a java `.class` file that contains a main method by using just the class name:
|
|
|
|
`java {{classname}}`
|
|
|
|
- Execute a `.jar` program:
|
|
|
|
`java -jar {{filename.jar}}`
|
|
|
|
- Execute a `.jar` program with debug waiting to connect on port 5005:
|
|
|
|
`java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 -jar {{filename.jar}}`
|
|
|
|
- Display JDK, JRE and HotSpot versions:
|
|
|
|
`java -version`
|
|
|
|
- Display usage information for the java command:
|
|
|
|
`java -help`
|