Check out example codes for "java get current desktop". It will help you in understanding the concepts better.

Code Example 1

File home = FileSystemView.getFileSystemView().getHomeDirectory();
home.getAbsolutePath();

Learn ReactJs, React Native from akashmittal.com