How can I suppress warnings in NetBeans 6.9.1?
On teaching JavaFX, we use some older files containing Swing components. They run OK in NetBeans 6.8, but in NetBeans 6.9.1 many following warnings are generated:
warning: [warnon开发者_运维百科use] Package javafx.ext.swing has been used. import javafx.ext.swing.SwingToggleButton;
Is there any way to suppress generation of these warnings?
In the desktop.properties file under your JavaFX SDK profiles directory,
you can change the property
swing_compile_opts="-XDwarnOnUse=javafx.ext"
to swing_compile_opts=
Under Netbeans this would be in NETBEANS_HOME/javafx/javafx-sdk/profiles.
This only applies to 1.3.1 and most likely will be totally different in the next major release of JavaFX.
Thanks, Jim. That does the trick.
For Mac users, you have to go into your /Applications/Netbeans/Netbeans 6.9.1.app folder, then down to
Contents/Resources/NetBeans/javafx/javafx-sdk/profiles.
I modified the desktop profile and after restarting Netbeans the warnings went away.
精彩评论