I have checked similar qestions where they suggested to use String
as a parameter. But that is what I do.
My Code:
uri.lastIndexOf(File.separator)
Where uri
is: file:/C:/Users/oto@increase.dk/workspace/Maersk_Line_GaTracking/bin/
Maybe that is because Windows uses back slashes as file separator. But why then, when I retrieve the URI, I am getting forward slashes?
String uri = DataRetrieval.class.getProtectionDomain().getCodeSource().getLocation() + "";