Get the path before the application is initialized

Hi everybody,

I am using a .ini-File to get some parameters for my application. This works fine when the application is initialized, I simply get the path of the application via

WebApplicationContext context = (WebApplicationContext)getContext();
Path = new File (context.getHttpSession().getServletContext().getRealPath("/VAADIN"));

and access the ini-file.

But there are some parameters I need even before the application is initialized (it throws a null-pointer if I am doing it the same way). Is there any way to get the path before the application is initialized? If I am accesing the root path (for example via ImageIO.write(image, “png”, new File(“/findMe.png”)):wink: it is C:/ if I am using it via Eclipse/workspace metadata and if I am using the application as a standalone on my tomcat the rootfolder is the tomcat rootfolder (not webapps or a directory in the tomcatfolder, it’s in the “\Tomcat_7.0” directory). Therefore it is not possible to get the .ini-file by setting the path from the rootfolder because C:/ and the tomcat rootfolder of course is not the same.

Thanks for your help and have a nice week!