Ok, here is a simple example using JFileChooser and for some reason it's saying it can't find the symbol "File" in the line "File chosenFile = fileChooser.getSelectedFile();". I feel liken this is something really simple, that I am forgetting.
public class JavaExample
public static void main (String  args)
JFileChooser fileChooser = new JFileChooser();
int status = fileChooser.showOpenDialog(null);
if (status == JFileChooser.APPROVE_OPTION)
File chosenFile = fileChooser.getSelectedFile();
String fileName = chosenFile.getPath();
JOptionPane.showMessageDialog(null,"The file's path is : " + fileName);
else if (status ==JFileChooser.CANCEL_OPTION)
JOptionPane.showMessageDialog(null,"You chose to cancel.");
Forgot to import the java.io.*; package. Haha, I think I'm having an off day. :p
Where's the import for File? If you don't know what you need to import, look it up in the API.
And I suggest you get rid of unused imports; they just add clutter and obscure which classes are actually used.
edit Posts crossed. The suggestion still stands. And why do an import on demand when you only need one class from that package?