mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 15:35:27 +02:00
java: add classpath example and update link (#7358)
This commit is contained in:
parent
3ae5dd0e39
commit
057a5c52fa
1 changed files with 5 additions and 1 deletions
|
@ -1,12 +1,16 @@
|
|||
# java
|
||||
|
||||
> Java Application Launcher.
|
||||
> More information: <https://java.com>.
|
||||
> More information: <https://docs.oracle.com/en/java/javase/17/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}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue