Can I associate a file type with NetBeans to be able to open files of that type from File Explorer?
http://wiki.netbeans.org/FaqCliOpen
Yes, you can. Just pass the name of the file to be opened as the only argument in your command line interface.
For example:
netbeans MyFile.java
The same command can be used to create an association for files of specific types in the file manager (below)
You can also use the explicit --open option for clarity, and pass more than one file; for example, on Unix:
find src -name \*.java -print0 | xargs -0 netbeans --open
If there is an instance of the IDE already running, the file will simply open in this instance and the command will exit. You may need to pass the --userdir option to match the user directory of the running IDE.
In addition, you can specify the line at which the file should open (line numbers start at 1):
netbeans Something.java:55