Modify

Opened 4 years ago

Last modified 4 years ago

#20734 new enhancement

Use com.sun.net.httpserver.HttpServer

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: Core remotecontrol Version:
Keywords: Cc:

Description

Javadoc for com.sun.net.httpserver.HttpServer

This class implements a simple HTTP server.

https://www.mail-archive.com/net-dev@openjdk.java.net/msg15422.html

Around 10% of the com.sun namespace is supported for use outside the JDK. Examples of supported com.sun APIs include:

  • The Compiler Tree API (four com.sun packages exported by the jdk.compiler module)
  • The HTTP Server API (two com.sun packages exported by the jdk.httpserver module)
  • The SCTP API (the com.sun.nio.sctp package exported by the jdk.sctp module)
  • JDK-specific extensions to the NIO API (the com.sun.nio.file package exported by the jdk.unsupported module)

You can view a list of the internal com.sun packages and the supported com.sun packages at https://cr.openjdk.java.net/~mr/jigsaw/jdk8-packages-strongly-encapsulated

Somewhat related: JEP 408: Simple Web Server – https://openjdk.java.net/jeps/408

Provide a command-line tool to start a minimal web server that serves static files in the current directory. This low-threshold utility will be useful for prototyping, ad-hoc coding, and testing purposes, particularly in educational contexts.

Attachments (0)

Change History (1)

comment:1 by Don-vip, 4 years ago

Please note this class is in jdk.httpserver module in Java 9+ so it might require some additional command line arguments in launchers (junit, jnlp, macos, linux, etc.)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to simon04.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.