Search Results

Search found 1 results on 1 pages for 'user1630359'.

Page 1/1 | 1 

  • Unable to load directory when using jar [on hold]

    - by user1630359
    I've a directory in my eclipse project, in build path which contains files (txt). Now, when i run the application from eclipse, i can read the files (using #1 below). but, when i export my application to jar and run it from other pc i can't read the files or even check whether the directory exist or not. All the below lines are always return NULL! 1. File dir = new File("files"); 2. File dir = this.getClass().getResourceAsStream("files"); 3. File dir = this.getClass().getClassLoader().getResource("files"); any assistance will be appreciated! Thanks!

    Read the article

1