Thread: Error Running Source in Eclipse IDE [FIXED]

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Error Running Source in Eclipse IDE [FIXED] 
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Hello, I have been messing around with this for the past hour, and I can't help to feel, I'm missing something very small.

    If someone could try to help me solve this, it would be greatly appreciated thank you.

    I used this thread to help get through a part of the problem to begin with. https://www.rune-server.ee/runescape...r-eclipse.html

    Spoiler for ERROR:

    Code:
    C:\Users\wills\Documents\Runescape\PS\Auguish\Anguish-Server/Data/
    item_config.cfg: file not found.
    java.io.FileNotFoundException: .\data\cfg\item_prices.txt (The system cannot find the path specified)
    	at java.io.FileInputStream.open0(Native Method)
    	at java.io.FileInputStream.open(Unknown Source)
    	at java.io.FileInputStream.<init>(Unknown Source)
    	at java.util.Scanner.<init>(Unknown Source)
    	at ethos.world.ItemHandler.loadItemPrices(ItemHandler.java:361)
    	at ethos.world.ItemHandler.<init>(ItemHandler.java:57)
    	at ethos.Server.<clinit>(Server.java:137)



    Spoiler for METHODS ETC.:

    Code:
    public void loadItemPrices(String filename) {
    		try (Scanner s = new Scanner(new File("./data/cfg/" + filename))) {
    			while (s.hasNextLine()) {
    				String[] line = s.nextLine().split(" ");
    				ItemList temp = getItemList(Integer.parseInt(line[0]));
    				if (temp != null)
    					temp.ShopValue = Integer.parseInt(line[1]);
    			}
    		} catch (IOException e) {
    			e.printStackTrace();
    		}
    	}
    Code:
    public ItemHandler() {
    		ItemList = new ItemList[Config.ITEM_LIMIT];
    		for (int i = 0; i < Config.ITEM_LIMIT; i++) {
    			ItemList[i] = null;
    		}
    		loadItemList("item_config.cfg");
    		loadItemPrices("item_prices.txt");
    	}
    Code:
    public static ItemHandler itemHandler = new ItemHandler();



    Attached image


    EDIT: Fixed, thanks to Shadowpker & Kevy.
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  2. #2  
    Registered Member KushKings's Avatar
    Join Date
    Jul 2018
    Posts
    457
    Thanks given
    53
    Thanks received
    24
    Rep Power
    37
    it looks like its telling you it cant find item_prices.txt I would check data/ cfg and see if u have item_prices.txt in there
    Attached image
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Quote Originally Posted by KushKings View Post
    it looks like its telling you it cant find item_prices.txt I would check data/ cfg and see if u have item_prices.txt in there
    I do, I really did try to figure this out for myself for a good hour or so, I’m wondering if it has something to do with how I’m going about finding the path. I’m not sure.
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  5. #4  
    Administrator

    Kevy's Avatar
    Join Date
    Jul 2006
    Posts
    1,428
    Thanks given
    204
    Thanks received
    1,905
    Rep Power
    5000
    Quote Originally Posted by Grown View Post
    I do, I really did try to figure this out for myself for a good hour or so, I’m wondering if it has something to do with how I’m going about finding the path. I’m not sure.

    Please post a picture of directory listing you have item_config.cfg in.
    Thanks, Kevin.
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Quote Originally Posted by Kevy View Post
    Please post a picture of directory listing you have item_config.cfg in.
    Attached image
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  8. #6  
    Registered Member
    Join Date
    Apr 2020
    Posts
    32
    Thanks given
    1
    Thanks received
    5
    Rep Power
    42
    What happens if you replace
    Code:
    try (Scanner s = new Scanner(new File("./data/cfg/" + filename))) {
    with this
    Code:
    try (Scanner s = new Scanner(new File("C:/Users/wills/Documents/Runescape/PS/Auguish/Anguish-Server/data/cfg/" + filename))) {
    Looking at the first line of your error data has the d capitalized and its missing the cfg folder and you got this going on \\\\\\ //
    Also you have named a folder Auguish then directly after named it Anguish not much consistency here
    Code:
    C:\Users\wills\Documents\Runescape\PS\Auguish\Anguish-Server/Data/
    item_config.cfg: file not found.
    Reply With Quote  
     

  9. Thankful user:


  10. #7  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Do you have teamviewer? I can get this going for you free of charge
    Reply With Quote  
     

  11. Thankful user:


  12. #8  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Quote Originally Posted by Shadowpker View Post
    Do you have teamviewer? I can get this going for you free of charge
    Yes, I do.

    I'll PM my information.

    Quote Originally Posted by ggtip2 View Post
    What happens if you replace
    Code:
    try (Scanner s = new Scanner(new File("./data/cfg/" + filename))) {
    with this
    Code:
    try (Scanner s = new Scanner(new File("C:/Users/wills/Documents/Runescape/PS/Auguish/Anguish-Server/data/cfg/" + filename))) {
    Looking at the first line of your error data has the d capitalized and its missing the cfg folder and you got this going on \\\\\\ //
    Also you have named a folder Auguish then directly after named it Anguish not much consistency here
    Code:
    C:\Users\wills\Documents\Runescape\PS\Auguish\Anguish-Server/Data/
    item_config.cfg: file not found.
    Replacing it with the line doesn't change the error.

    Thank you for your help though.
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  13. #9  
    Administrator

    Kevy's Avatar
    Join Date
    Jul 2006
    Posts
    1,428
    Thanks given
    204
    Thanks received
    1,905
    Rep Power
    5000
    Hit me up on Discord I will fix it for you over teamviewer if someone else doesn't help you before


    Quote Originally Posted by Grown View Post
    Yes, I do.

    I'll PM my information.

    Replacing it with the line doesn't change the error.

    Thank you for your help though.
    Thanks, Kevin.
    Reply With Quote  
     

  14. Thankful users:


  15. #10  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Quote Originally Posted by Kevy View Post
    Hit me up on Discord I will fix it for you over teamviewer if someone else doesn't help you before
    Thank you.

    I PM'd my discord username to you.
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Running client and source in eclipse IDE
    By Vinbruh in forum Help
    Replies: 2
    Last Post: 08-13-2015, 03:32 AM
  2. Replies: 5
    Last Post: 05-03-2013, 04:06 AM
  3. 718 running source with Eclipse error
    By daggertail90 in forum Help
    Replies: 3
    Last Post: 04-07-2013, 05:39 PM
  4. Replies: 14
    Last Post: 11-27-2011, 04:04 AM
  5. Replies: 5
    Last Post: 03-12-2011, 08:07 AM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •