java – com. sun. AWT package usage
•
Java
I found a java code and wanted to use it in my project It contains these imports that my JDK does not have:
import com.sun.awt.AWTUtilities; import com.sun.jna.Native; import com.sun.jna.platform.WindowUtils;
I mentioned the sun website and found this download page:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Is it necessary to download all jdks and jres and replace them from the sun website? My JDK is version 6 and up to date
Thank you
Solution
JNA is an additional library, not part of the standard API. You must download it (here) and include it in the classpath
The awtutilities class is only published with the sun JVM as the implementation details of the API, so it may change, which may destroy any program (don't use it if possible)
It can be on platform Jar, which can be found on the same page as JNA
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码