I need to get the path of a selected file in explorer.exe. I need it from something System Variable or somewhere as I can read in with a java application.
There isn't a system level attribute that will allow you to observe the selected file. there are a couple options, but both are pretty big detours.
the most traditional approach is to have your java app spawn the window in question, via some API that allows you to retrieve the file information on some event. the jFileChooser is one of these.
another approach is to leverage the windows API directly. you would need to capture the window handle of the windows explorer instance and inspect it with an object like ShellWindows. see some more info here: http://blogs.msdn.com/b/oldnewthing/archive/2004/07/20/188696.aspx
not sure how to interface with the winAPI via java, but I;m sure there's a way.
This probably belongs on StackOverflow instead of SU.