How do I import a sun.* class in jshell

Ben Evans benjamin.john.evans at gmail.com
Wed Apr 13 14:43:57 UTC 2016


Hi Max,

This is being stopped by the Java 9 module system, as sun.* is an
internal package.

Is there a flag that can be used to override this in jshell? Do we
think such a feature would even be desirable?

Thanks,

Ben


On Wed, Apr 13, 2016 at 10:22 AM, Wang Weijun <weijun.wang at oracle.com> wrote:
>
> $ jshell -J-XaddExports:java.base/sun.security.provider=ALL-UNNAMED
> |  Welcome to JShell -- Version 9-internal
> |  Type /help for help
>
> -> import sun.security.provider.SecureRandom
> |  Error:
> |  package sun.security.provider does not exist
> |  import sun.security.provider.SecureRandom;
> |         ^--------------------------------^
>
> Thanks
> Max
>


More information about the kulla-dev mailing list