3

Is there a 1liner to start a local http server in java?

With Ruby: ruby -run -e httpd -- . -p 8000
With Python: python -m SimpleHTTPServer 4000

When I searched on Java I found nothing so easy and a lot of confusing results, nothing close to the brief 1 liners above.

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
  • Take a look at [Spring Boot](https://projects.spring.io/spring-boot/). – Elliott Frisch Mar 12 '17 at 01:03
  • 1
    Spring Boot might be a bit heavy for this if you don't intend to take advantage of any other features. Maybe some worthwhile reading: http://stackoverflow.com/questions/3732109/simple-http-server-in-java-using-only-java-se-api – CollinD Mar 12 '17 at 01:03

0 Answers0