java - Read forward slash from JFileChooser file-name dialog -


i need read file name jfilechooser file-name input dialog consist of forward slash '/'. it's taking backslash '\' path separator in windows environment.

actually jfilechooser return path suitable machine running on. in case of windows backward slash , mac forward slash. jfilechooser returns file object , calling getcanonicalpath path has different format depending on os.

so imo there seems no clean way @ least. 1 possibility read file name , replace backward slash forward slash. doubt work you.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -