It is required to get the absolute path of the current directory where my class is residing. This has to happen during runtime inside application server.
Following solutions in the internet were not useful for me.
URL classFileDir = new TestAnything().getClass().getResource("./");
File currDir = new File(".");
System.out.println ( "Dir : " + currDir );
System.out.println ( "Dir : " + currDir.getCanonicalPath() );
Any other idea?