7 Replies Latest reply: Jan 3, 2008 2:51 PM by jschellSomeoneStoleMyAlias RSS

    How to get the directory of a file within an executable jar?

    807601
      I want to be able to create a new File() with a .xml that is within a folder in my executable jar. I have tried getting the directory with
      String.valueOf(getClass().getResource("/data/info.xml")).substring(6).trim()
      which works if i use command prompt but does not work when i use the excutable. Any ideas are welcome :D

      Thanks.