javax.activation.DataSource class not found

Alan Snyder javalists at cbfiddle.com
Mon Nov 28 15:59:27 UTC 2016


Thank you.

This marks the first case where I need a different command line to run on JDK 9. :-(



> On Nov 28, 2016, at 7:38 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 28/11/2016 15:32, Alan Snyder wrote:
> 
>> Trying to create a javax.mail.internet.MimeMessage, I get this error in release 144:
>> 
>> java.lang.ClassNotFoundException: javax.activation.DataSource
>> 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:367)
>> 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:186)
>> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:477)
>>>> 
>> Is this a known bug?
>> 
>> I cannot tell if it relates to JDK-8160373.
>> 
> The modules owned by Java EE are not resolved by defaulted in JDK 9, see the section on "Root Modules" in JEP 261 [1] for more details on that, also the "Risks and Assumptions" for more of the rational.
> 
> In this case, you can run with `--add-modules java.activation` or else put activation.jar on the class path.
> 
> -Alan
> 
> [1] http://openjdk.java.net/jeps/261



More information about the jdk9-dev mailing list