• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

My method cannot extract the resource files from the path. The folder marked as directory

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the exception(

I've just started with copying code from the course "How to create your own minesweeper etc" but when I marked the res directory as Resources Boot, the "img" directory just stayed a common directory and not changed to a folder like the "sweeper" package (but in the video course that's happened). Hence I have the exception of the non-existing path and still wondering how to create path to the images.
Sry in advance if you've found here some comlitricated English 'cause it's my first message to the abroad (not quite sure that's a correct sentence).
 
Saloon Keeper
Posts: 24202
166
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Dimitry!

If you're developing an Android app, the images that will be stored in the APK have to be in the proper directory and your build environment has to know about them.

If you created a blank project with the IntelliJ Android Developer Studio, that should be the [tt]dev/mipmap[/i] directory, I think.
 
Dmitriy Kolesnik
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the feedback but it's just an app that's created on PC for desktop users
 
Marshal
Posts: 73751
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch (again)

Please use copy'n'paste to post the text of your exception stack trace; I can't read the screenshot. Please post the code you are using to open the img directory, and more details of the exact location on the img directory.
 
Tim Holloway
Saloon Keeper
Posts: 24202
166
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, sorry. Your post had been mistakenly moved to the Android forum.

For a standard Java desktop app you would usually want to keep resource files in the application classpath and if you're creating an executable JAR, that means copying the source images unto a directory in the JAR that you are building.

The terms "directory" and "folder" are generally interchangeable in operating system terms. I suspect what you really mean is that you are using some sort of IDE like NetBeans, IntelliJ or Eclipse, which can use a different icon to indicate folders that the IDE considers to be special, such as the source code folder.

We're going to have to have more information about what you are using to edit and build your project if that is the case.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic