# Can't access core/assets in a Desktop-Only Libgdx Project

I'm trying to use libgdx to set up a little quiz application for Desktop.

So I used the setup.jar to create a project and everything went fine (using Eclipse).

The problem is following:

Whenever I try to access the assets in core/assets, as you should do: Gdx.files.internal(filePath)

I always get a NullPointerException:

java.io.FileNotFoundException: PATH\QuizApplication\desktop\questions.xml (The system cannot find the file specified)


My assets Folder in the desktop project is linked to the core project, and inside Eclipse, I can see the right contents. As you can see from the Exception, the application tries to read the desktop project instead of the core project.

In build.gradle in the desktop project, the link to the core assets folder is there too:

project.ext.assetsDir = new File("../core/assets");


Does anyone know how I might fix this problem, so that I can access the core/assets folder?

• You probably need to set your working directory to the assets folder. Read this answer: stackoverflow.com/questions/26195511/… – Gad Wissberg Apr 18 '18 at 8:56
• Thanks,that fixxed it! Now I'm having other problems concerning packaging the Application with gradlew. I guess I'll start from scratch and test everything step by step to see where I made a mistake. – Wyatt Gilette Apr 19 '18 at 16:02
• If you found a solution to own question, you can post an answer yourself. – wondra Apr 19 '18 at 19:16