Bug 594 - Eclipse cannot find a filepath
Summary: Eclipse cannot find a filepath
Status: RESOLVED FIXED
Alias: None
Product: Group14-Pacman
Classification: Unclassified
Component: Game (show other bugs)
Version: 0.0.2
Hardware: PC Windows
: High major
Assignee: Omar MOUSTAFA
URL:
Depends on:
Blocks:
 
Reported: 2021-11-21 00:57 HKT by Aleksa
Modified: 2021-12-06 22:55 HKT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksa 2021-11-21 00:57:41 HKT
I ran Main.java and expected to see a console output with a maze, PacMan and ghosts. Instead I got a Java Exception that Eclipse could not find a file path in which we stored our maze. This is the actual output:

java.io.FileNotFoundException: src\Resource\easyGhostData.txt (The system cannot find the file specified)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:153)
	at java.base/java.util.Scanner.<init>(Scanner.java:639)
	at Game.Ghost.initGhosts(Ghost.java:18)
	at Game.Game.gameInit(Game.java:25)
	at Game.Main.main(Main.java:7)
java.io.FileNotFoundException: src\Resource\easyPacMandata.txt (The system cannot find the file specified)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:153)
	at java.base/java.util.Scanner.<init>(Scanner.java:639)
	at Game.PacMan.initPacMan(PacMan.java:27)
	at Game.Game.gameInit(Game.java:26)
	at Game.Main.main(Main.java:7)
java.io.FileNotFoundException: src\Resource\easyAlgorithmData.txt (The system cannot find the file specified)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
Comment 1 Aleksa 2021-11-21 00:59:28 HKT
I saw that the minor mistake was that we initialized our Game.java with difficulty Easy, but only prepared files for difficulty Medium. Medium is set to be the new difficulty. It is fixed now.