i.krivosheev
i.krivosheev

Reputation: 397

Java not found package

In my project there are import:

import static com.sun.java.accessibility.util.AWTEventMonitor.addKeyListener;

but javac say:

error: package com.sun.java.accessibility.util does not exist
import static com.sun.java.accessibility.util.AWTEventMonitor.addKeyListener;

OS: ubuntu 12.04, Java:

[ivan@noutbook ~/projects/Java/sch3dedit]$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

How can I solve this problem?

Upvotes: 0

Views: 128

Answers (1)

Sean Patrick Floyd
Sean Patrick Floyd

Reputation: 298818

All classes in packages named sun.* or com.sun.* are proprietary to the Sun / Oracle jdk and hence not part of OpenJDK. You should not use these classes as they are not part of the public API!

Upvotes: 3

Related Questions