I have the following problem in a Java application
By this statment I retrieve the current location of my application:
URL location = Main.class.getProtectionDomain().getCodeSource().getLocation();
So for example my location contains a path like: /C:/Projects/edi-sta/out/production/edi-sta/
Ok, how can I easilly obtain the parent path?
For example, considering the previous path, how can I obtain the ****/C:/Projects/edi-sta/out/production/** path (that is the direct parent of the last edi-sta/ folder) ?
Java provide me something that do it out of the box or have I to implement a string manipulation?