简体   繁体   English

Java捕获运行时警告/检测图形卡

[英]Java Catching Runtime Warnings/Detecting Graphics Card

The application I'm developing needs to run JavaFX8 (3D support) if able and default to JavaFX (2D) if the system my application is being run on can't support 3D. 我正在开发的应用程序需要运行JavaFX8(3D支持),如果正在运行我的应用程序的系统不支持3D,则默认为JavaFX(2D)。

The system I'm running on has no graphics card and cannot support 3D on runtime. 我正在运行的系统没有图形卡,并且在运行时不支持3D。 The 3D support is a future proofing measure. 3D支持是未来的证明措施。 When Netbeans compiles my code there are no warnings or errors. Netbeans编译我的代码时,没有警告或错误。 However, there are runtime warnings (not errors or exceptions). 但是,有运行时警告(不是错误或异常)。 I've tried throwing a try/catch around the declarations that create the warnings but nothing is caught. 我试过在创建警告的声明周围进行try / catch,但没有发现任何问题。

I need a way to either detect these warnings or detect whether or not the system can support 3D. 我需要一种方法来检测这些警告或检测系统是否可以支持3D。

未测试(因为我没有可以正确测试此系统的系统),但请尝试

Platform.isSupported(ConditionalFeature.SCENE3D);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM