Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how getting the name of file without extension ?

807591May 27 2007 — edited Apr 29 2008
Hello all!

I am trying to get the name of a file like this :
JFileChooser dialog = new JFileChooser
File x= dialog.getSelectedFile();
String name = x.getName();
but x is name_of_the file+"."+extension;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2008
Added on May 27 2007
5 comments
546 views