How do I convert a relative path in Ant to an absolute path?

Ant

Ant Problem Overview


I would like to convert a relative path to an absolute path.

How is that done?

Ant Solutions


Solution 1 - Ant

The location attribute on the property task will convert relative paths to absolute.

<property name="absolute.path" location="${relative.path}"/>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJavaRockyView Question on Stackoverflow
Solution 1 - AntkrockView Answer on Stackoverflow