8 Replies Latest reply on Nov 21, 2012 10:25 AM by 800381

    Get hard disk letter (C:\ or D:\) only from the path

      I have a requirement in my project to display only hard disk letter (C:\ or D:\) even when the user selects the directory/files inside the disk.
      This need to work on both Windows and MAC OS. Is there a way to achieve this in Java?

      E.g. If the user selected D:\Test\Test1 then we need to get only D:\