Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Using resources on Android?

  1. #1
    Member Gravity Games's Avatar
    Join Date
    May 2012
    Posts
    152
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Using resources on Android?

    Hi, Gravity Games here. I've been working on my level format and I put a .txt file in my app project's res folder. For some reason, I can't load it with the File command, even though I entered the path name correctly ("res/levels/w1-1.txt"). I've tried "levels/w1-1.txt" and res//levels//w1-1.txt" and I even tried leaving off the file extension. What am I missing?

    EDIT: Nevermind, apparantly when I reference files in this way, I should put them in the assets folder instead...
    Last edited by Gravity Games; August 18th, 2012 at 12:39 PM.
    Current Projects (and planned release dates):

    Chomp's Wacky Worlds [???] (PC, Android and Ouya)
    Kyle the Caiman [???] (PC, Android and Ouya)
    KTC: King Crocko's Mystic Maze [???] (PC, Android and Ouya)


Similar Threads

  1. How to set resources folder?
    By A1Artem in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: July 7th, 2012, 09:45 PM
  2. What Java Books / Resources Do you use?
    By djl1990 in forum The Cafe
    Replies: 4
    Last Post: November 7th, 2011, 03:07 PM
  3. JOGL java bindings resources
    By lilroo in forum Member Introductions
    Replies: 2
    Last Post: September 10th, 2011, 06:27 PM
  4. Using JAVA to access System Resources
    By aussiemcgr in forum Java Theory & Questions
    Replies: 9
    Last Post: December 4th, 2010, 01:15 AM
  5. Access jar's resources within a servlet
    By RogerBotter in forum Java Servlet
    Replies: 2
    Last Post: July 14th, 2010, 10:18 AM