Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+16 votes

When we are trying to read from the csv file, the code with the path starting from csv works for 2 of us but not the other 2 and when we start the path with the name of the project it works for the 2 where that having the path start with src didn't work, but now isn't working for the other 2 of us. For those of us where it was fine with starting from src the name of the project was included in the path, but for those where it didn't work the name of the project wasn't in there. When we added the name of the project to the path for some of us it doubled the name of the project in the path Is there a way to fix this or are we going to have to deal with it?

asked in CSC305 Fall 2023 by (1 point)

2 Answers

+7 votes

The question is why two of you have a different initial "working directory" when launching your program. The default working directory should be the project folder, so it shouldn't be necessary to include the project folder name at the beginning of your relative path to the CSV file.

Is it possible that two of your team have opened the Repo folder as a project within IntelliJ, and two of you have opened the Project folder?

Everyone should be opening the project, and not the repo...

If that isn't the issue, we may need to look into it more, and see what other variables are different between machines.

answered by (508 points)

I was opening it from the Repo folder instead of the project folder. I opened it from the project folder, but now I'm getting "Error: JavaFX runtime components are missing, and are required to run this application" when I try to run it. How do I fix this?

+5 votes

something we did for our project was we used the absolute file path for the documents and since the absolute file paths will differ for everyone we used "System.getProperty("user.dir")" which gives us the file path till the Gymnastics-Lesson-Planner then manually added the path to the csv file cause if you've got the path till the project, all the file locations within the project will be the same for everyone

answered by (2.3k points)