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
Post a Comment