Files
tldr/pages/common/java.md
Vitor Henrique d0a73c4b9c pages*: fix brand and technical names (#12145)
* pages*: fix Python, Java, pacman, apt, *zip*, xz, tar, git, RPM and grep names

* pages*: fix brand and technical names

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* fluxctl, gitmoji, in-toto-run, osv-scanner: replace `git` with Git

* bzegrep: enclose egrep with backticks

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* git-bug: use Git instead of `git`

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* git-bug: use Git instead of `git`

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* git-force-clone: use Git instead of `git`

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* gitwatch: use Git instead of `git`

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* hub-init: use Git instead of `git`

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

* pages.*: use Linux instead of GNU/Linux

---------

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-01-30 12:46:32 +08:00

752 B

java

Java application launcher. More information: https://docs.oracle.com/en/java/javase/20/docs/specs/man/java.html.

  • Execute a Java .class file that contains a main method by using just the class name:

java {{classname}}

  • Execute a Java program and use additional third-party or user-defined classes:

java -classpath {{path/to/classes1}}:{{path/to/classes2}}:. {{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