简体   繁体   中英

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.

The system I'm running on has no graphics card and cannot support 3D on runtime. The 3D support is a future proofing measure. When Netbeans compiles my code there are no warnings or errors. 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.

I need a way to either detect these warnings or detect whether or not the system can support 3D.

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

Platform.isSupported(ConditionalFeature.SCENE3D);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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