javaterminal / tryjshell

Try JShell on Web
http://tryjshell.org
MIT License
91 stars 13 forks source link

How can I add modules? #4

Closed maykon-oliveira closed 6 years ago

maykon-oliveira commented 6 years ago

I would like to add module, it is very usefull, you can add this feacture in the next release. Something like this: jshell -v --add-modules jdk.incubator.httpclient For to do tutorials that need others modules Java 9: HTTP Client and Process API in JShell

rahmanusta commented 6 years ago

It was incubator module in Java 9, then standardized in Java 11. Standart module name is java.net.http . See https://download.java.net/java/early_access/jdk11/docs/api/java.net.http/module-summary.html

maykon-oliveira commented 6 years ago

Thanks, I understand, but can't add modules in the web page anyway

rahmanusta commented 6 years ago

Because it is standard module from Java 11, just import the package (import java.net.http.*;) and use HttpClient

Standard modules are already loaded.