uri - Java: How to use AbsolutePath as a Link -


i´m writing java , 1 of task convert input/output in html. going good, can read files , path of files. i´m trying convert path in normal link so:

"<a href=" + file.getabsolutepath() + " target=_parent>" 

works pretty good, but:

  • one, explorer show error can´t read file, example: jpg or word file..
  • two, if path have blank like: "my picture.jpg" recognize after blank normal text...

can give me tipp, how fix that, or using wrong method?

you can use touri() method turns file path uri:

file.getabsolutefile().touri().tostring() 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -