linux - java getabsolute() fails for path with spaces? -


in code, call getabsolutepath path file. works totally fine, if file path doesnot contain spaces. example: ~/desktop/data/a.txt

but got totally wrong file path if space exists, example ~/desktop/data set/b.txt

is bug in java? way absolute path right , without spaces?

code like:

 public void loaddatafile(java.io.file f)       {           system.out.println("f.getabsolutepath "+f.getabsolutepath());           ...        }   is:       /home/xx/humans_d/results/a1/a.txt   should be:      /home/xx/desktop/data/hrv pilot humans_d/results/a1.a.txt 

thanks lot.

lj


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -