What do I need to know about Java's dot syntax naming conventions as a NetBeans user
...to customize the look and feel of the NetBeans IDE? For this change it is necessary to add this line to netbeans.conf: netbeans_default_options= "[...] --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
. Other look and feel jar files can be set with a simpler keyword, ie "Nimbus".
I understand (from another post where it was said if the keyword didn't work you will have to enter the full class name) the keyword is a shortcut variable for the longer dot syntax.开发者_StackOverflow When I searched my whole system and didn't find anything named 'com.sun.java.swing.plaf.gtk.GTKLookAndFeel' or 'GTKLookAndFeel'.
I don't need a developer's perspective. Just the basic landscape of Java file names as I should encounter them configuring and changing NetBeans settings, plugins, etc.
There is no direct, necessary relationship between the actual name of the class and the name of the jar it is stored in. The com.sun.java....
part reflects the internal structure ("subdirectories") in the jar file. If the jar is on the classpath, the runtime will find the class anyways.
As trashgod already hinted, the GTK look and feel is only included - and will only work - on Linux systems, no use transplanting it onto eg a Windows box.
The reason why some look and feels work by just specifying a short name is explained here: Metal, Nimbus, GTK, Windows and Aqua look and feels are built-in shortcuts.
精彩评论