Cannot make InputStream from file inside project

I have a file

RobotConfig.xml 

inside my WPILibrary java robot project.

It is located in the package

org.usfirst.frc.team1732.robot.config

I am trying to make an InputStream with that file by doing this:

ClassLoader.getSystemClassLoader().getResourceAsStream("org/usfirst/frc/team1732/robot/config/RobotConfig.xml")

However, that returns “null” (because it isn’t finding it I’m assuming).

Does anyone know how to load files within my eclipse project while the program is running on the Roborio?

The file has to be copied to the RoboRIO, either inside the JAR that gets deployed with your code or as a separate file saved in the directory where the robot code is run from.

You might also want to consider using WPILib’s properties storage, which requires less work, but isn’t as flexible as XML.

Why does it have to be copied? I just tested this with a jar on my computer and it does work. Is there a way to get around copying the file?

Also, it should be getting deployed - it is in the same package as code that is getting deployed