Java swing does not work in Debian 9.2

I've installed latest version of Java Eclipse and JDK under Debian 9.0. When I create a JFrame, some errors occur, for example:

Access restriction: The constructor EmptyBorder(int, int, int, int) is not accessible due to restriction on required library /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar

Any ideas on how to fix the problem?


Check the build path in Eclipse for that project.

This is similar to this question which has fix instructions: JDK Access Restriction Fix

链接地址: http://www.djcxy.com/p/12826.html

上一篇: `=`和`<有什么区别?

下一篇: Java swing在Debian 9.2中不起作用