I want to get the image from the resources folder, but when I get it, the Input Stream is all null and there is a message “resources cannont be nested in directories in Codename One! Invalid resource: : /resources/0.png”
new DataInputStream(Display.getInstance().getResourceAsStream(FilePack.class, "/resources/0.png"));
The path of the resources folder is common/src/resources and of the Main class with 0.png is common/src/main/game/Main.java
Is there any way to fix it?
New contributor
Duy Khong Phai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.