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 3 of 3

Thread: How to use res file in a project!

  1. #1
    Member
    Join Date
    Sep 2013
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default How to use res file in a project!

    Hi, I made a res folder for easy access to .png and .txt files . So how do I access them do i do "/example.txt" because that is not working.

    For Example im doing something like this

     private Scanner m;
    try{
     	m = new Scanner(new File("Map.txt"));  //Not working.
    }catch(Exception e){system.out.println("ERROR");}


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: How to use res file in a project!

    Is this a question about how to configure an IDE?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How to use res file in a project!

    Maybe "./resfolder/example.txt", but you may have to play around with it to find the answer.

Similar Threads

  1. Replies: 0
    Last Post: April 3rd, 2013, 09:17 PM
  2. Replies: 6
    Last Post: October 26th, 2012, 10:52 AM
  3. College project: XML file from PC to Android
    By StudioGilliam in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: March 1st, 2012, 05:42 AM
  4. [SOLVED] How do I run test code in different file under a project
    By lostbit in forum Java Theory & Questions
    Replies: 1
    Last Post: September 28th, 2011, 11:31 AM
  5. [SOLVED] Pointing to file inside project
    By M3ss1ah in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: March 9th, 2011, 08:18 AM