Forrest logo
back to context overview

java

List of commands for java:

  • java:tldr:04439 java: Execute a `.jar` program.
    $ java -jar ${filename-jar}
    try on your machine
    explain this command
  • java:tldr:36111 java: 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}
    try on your machine
    explain this command
  • java:tldr:488ec java: Display usage information for the java command.
    $ java -help
    try on your machine
    explain this command
  • java:tldr:5d7f6 java: Display JDK, JRE and HotSpot versions.
    $ java -version
    try on your machine
    explain this command
  • java:tldr:82b05 java: Execute a java program and use additional third-party or user-defined classes.
    $ java -classpath ${path-to-classes1}:${path-to-classes2}:. ${classname}
    try on your machine
    explain this command
  • java:tldr:966e6 java: Execute a java `.class` file that contains a main method by using just the class name.
    $ java ${classname}
    try on your machine
    explain this command
back to context overview