I am using java 1.8 version. When I am trying to extend WToolkit class, getting below error. The type MyClass cannot subclass the final class WToolkit. is WToolkit is of type final in java 1.8?. Please help me.
Asked
Active
Viewed 150 times
2 Answers
1
Looks like sun.awt.windows.WToolkit is final in JDK 1.8, and it looks like it was not in JDK 1.7.
You generally should not be using classes from sun.* packages, as these are not part of the public API. In fact, in Java 9 access to these classes will be removed.
0
Yes the class WToolkit is final in java 8:
public final class WToolkit extends SunToolkit implements Runnable {
See the implementation.

Jens
- 67,715
- 15
- 98
- 113