[英]Is com.sun.javafx.robot.FXRobot proprietary
I am new to javafx, and I recently came across the FXRobot class. 我是javafx的新手,最近遇到了FXRobot类。 It works fine, but I am concerned about the long term support of the class, because usually when I use a com.sun class, the javac gives this error message:
它工作正常,但是我担心该类的长期支持,因为通常当我使用com.sun类时,javac会给出以下错误消息:
warning: com.sun.* is an internal proprietary API and may be removed in a future release
警告:com.sun。*是内部专有API,在将来的版本中可能会删除
Although the FXRobot class does not give me the above error, I just wanted to ask if the FXRobot class is a permanent part of the JDK, and if it is, then why is it not bundled with the javafx package instead of the com.sun.javafx package. 尽管FXRobot类没有给我上述错误,但是我只是想问一下FXRobot类是否是JDK的永久部分,如果是,那么为什么它不与javafx包而不是com.sun捆绑在一起? .javafx软件包。
I haven't tried java 9, but I think there is a very good chance that com.sun.javafx.robot.FXRobot
would not be usable from Java 9 user code due to the introduction of the Jigsaw module system and the systematic hiding of non-public API which goes along with that. 我还没有尝试过Java 9,但是由于引入了Jigsaw模块系统并且系统隐藏了Java 9,因此我认为很有可能
com.sun.javafx.robot.FXRobot
无法从Java 9用户代码中使用。非公共API
See: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization , which translates a lot of API which is private in Java 8 to public in Java 9, but which does not include the FXRobot class in the translation. 请参阅: JEP 253:为模块化准备JavaFX UI控件和CSS API ,以将Java 8中私有的许多API转换为Java 9中的公共API,但在转换中不包括FXRobot类。
Also see this mailing list exchange, which mentions removal of the com.sun.javafx.robot
package from the Java 9 codebase: 另请参阅此邮件列表交换,其中提到从Java 9代码库中删除
com.sun.javafx.robot
软件包:
So, it would seem not to be a good idea to rely on the FXRobot class. 因此,依靠FXRobot类似乎不是一个好主意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.