title: file.getName() on a File object created in Android from a file path generated in Java produces strange results
body: <p>I have a huge problem with a program that I either didn't have before or I didn't notice. I have to submit my work in 3.5 hours so hopefully someone who can help me sees this before then.</p>
  
  <p>I have a Java program with which a user would select files and then the paths of those files are passed to an Android application. Within the Android application, I create a new File object using the path, and then later on I call <code>fileObject.getName()</code>. </p>
  
  <p>This produces different results depending on if the Java program was run in Ubuntu or Windows. If run from Ubuntu then the Android app succesfully extracts the file name, however if run from windows then the Android app extracts the full path.</p>
  
  <p>I initially had the path which is sent to Android be the Canonical path, and I've since changed it to Absolute path because I wasn't sure if that was causing the issue. This hasn't resolved the problem. Is this issue a result of creating a File object within Android using a windows path? I thought that it wouldn't matter but I guess I was wrong.</p>
  
  <p>If anyone could help me within the next couple of hours you might save my degree, because this is an important project and I have already had to submit my report which does not mention this issue I have now encountered, so I can't even explain it any more I just have to fix it.</p>
  
  <p>For clarification, if I select a file in windows which has the path <code>C:\Users\Username\Pictures\picture.jpeg</code></p>
  
  <p>and then pass it to Android, the <code>getName()</code> method return's that exact path from the method </p>
  
  <p>Whereas if I do it from ubuntu with the path
  <code>/home/username/Pictures/picture.jpeg</code>
  and pass it to Android then <code>getName()</code> returns just <code>picture.jpeg</code> which is exactly what I need.</p>
  
  <p>Many thanks.</p>