I just recently found out about JME and started a new project in the SDK where I loaded textures into my game. All the textures in the game loaded fine without errors. I decided that I would rather use Intellij IDEA instead of the JME SDK so I imported the project contents into Intellij. When I run the project inside of IDEA, I get the following error:
Uncaught exception thrown in Thread[jME3 Main,5,main]
AssetNotFoundException: /Textures/card.png (Flipped) (Mipmapped)
The code runs fine in JME SDK and I have not changed any code since importing to IDEA. I have added the necessary JAR files to the IDEA project. What could be causing this?
@Override
public void simpleRender(RenderManager rm) {
int col = 0, c = 0, row = 0;
float[] cols = new float[]{-3.3f, 0f, 3.3f};
float[] rows = new float[]{-1.8f, 0f, 1.8f};
if(game.getStatus()){
for(Card card : game.getCardGrid()){
Box cardBox = new Box(1.5f, .75f, .02F);
Geometry cardGeo = new Geometry("Box", cardBox);
Material cardMat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
cardMat.setTexture("ColorMap", assetManager.loadTexture("/Textures/card.png"));
cardGeo.setMaterial(cardMat);
Node cardNode = new Node();
cardNode.attachChild(cardGeo);
cardNode.setLocalTranslation(cols[col], rows[row], -1F);
rootNode.attachChild(cardNode);
for(int i = 0; i < card.getNum(); i++){
Box shapeBox = new Box(.3F, .3F, .02F);
Geometry shapeGeo = new Geometry("Box", shapeBox);
Material shapeMat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
shapeMat.setTexture("ColorMap", assetManager.loadTexture("/Textures/"+card.getShape().name().toLowerCase()+"-"+card.getFill().name().toLowerCase()+"-"+card.getColor().name().toLowerCase()+".png"));
shapeGeo.setMaterial(shapeMat);
Node shapeNode = new Node();
shapeNode.attachChild(shapeGeo);
shapeNode.setLocalTranslation(col, row, -1F);
rootNode.attachChild(shapeNode);
}
if(col == 2){
col= 0;
row++;
} else {
col++;
}
c++;
}
}
}