Class SimpleWebServerNotes

java.lang.Object
net.jrodolfo.java_evolution.java18.SimpleWebServerNotes

public class SimpleWebServerNotes extends Object
Explains the simple web server introduced in Java 18.

Before Java 18, serving static files usually meant installing another tool or writing a small server. Java 18 added the jwebserver command-line tool for the simpler case: quickly serving a directory during local development, documentation review, or demos.

Unit tests do not launch it because that would introduce port and process-management concerns. This is a tooling feature, so notes communicate the practical usage without making the test suite depend on a background process.

  • Constructor Details

    • SimpleWebServerNotes

      public SimpleWebServerNotes()
  • Method Details

    • command

      public String command()
      Names the command-line tool.
      Returns:
      the tool name
    • exampleCommand

      public String exampleCommand()
      Gives a simple command example.
      Returns:
      a sample command
    • purpose

      public String purpose()
      Explains the intended use case.
      Returns:
      a short explanation