tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wallace" <pwall...@twowaytv.com.au>
Subject io.File relative path constructor
Date Wed, 07 Sep 2005 06:50:54 GMT
 
Hi,
	A should-be easy one - I do not wish to define an absolute path
to a File as it will packaged in a JAR, therefore its path will change.
How do I construct a File relative to my src root, something like File
file = new File("/path/myFile.xml");? I tried passing in a URL, URI but
am getting:

Exception in thread "main" java.lang.IllegalArgumentException: URI is
not hierarchical

when I jar and run it. Am using Win XP + Java 1.5.

Thanks

Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message