How Java 9 would help resolve NoClassDefFoundError through it's modularity ?

Java 9 would provide an error at compile time if there are different modules with the same package mapped to the same class loader and hence would provide a compile time check for this issue.

NoClassDefFoundError exists because of ambiguity at realtime because of multiple versions of same package / class exist. As Java 9 would provide a compile time check for it through clearly defined dependencies and exports and a check on duplicate packages being loaded by single class loader, it will fix the problem.




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus