Hidden Services are simply HTTP servers. Tor doesn't care, or know, about what exactly is serving the website. If you can write a HTTP Server in Java (or use an existing one such as [Jetty][1]), then you can use it to serve a Hidden Service website. You would configure it so that it will accept TCP connections only from localhost/127.0.0.1 on a port of your choosing. Further help with either configuring an existing Java HTTP Server, or writing your own is beyond the scope of this site. You would then edit your Tor configuration file to tell it to publish a Hidden Service, where your Tor Client would forward the requests to the port you specified in your HTTP Server. For further details see the [Tor Documentation][2], or other questions such as [this one][3]. If you encounter an issue with this part of the setup, that problem may be on topic here, so further questions could be asked. [1]: http://www.eclipse.org/jetty/ [2]: https://www.torproject.org/docs/tor-hidden-service.html.en [3]: http://tor.stackexchange.com/questions/329/how-to-set-up-a-tor-hidden-service