I was doing a clean CVS “checkout as java project” of jME in eclipse yesterday to get rid of some of my experiments. I came across several things that might be worth a consideration.
Since there are data files in the src directory, I need to add src to the class path if I want to start applications without running ant. Even if I run ant, I currently need to add jmetest-data.jar to the class path, even if I do not want to run the test classes, since AbstractGame sets the properties dialog image to jmetest/data… and SimpleGame uses jmetest/data… for the default font location.
Here’s my suggestion:
- create two toplevel directories resources and testresources
- move the files from src/jmetest/data into these according to what they are used for; only .java files should remain in src
- change the build.xml and buildtext.xml, so that the data gets packed into the jar files directly - no more jmetest-data.jar. Monkey.png can be read from jme.jar, too.
- something still to be done with the data toplevel directory
The benefit of having this would also be that in eclipse without running ant I would not have to add src to the class path for running applications, I could use resources. This in turn has the benefit that you can create other projects which rely on the export of the jME project, since they inherit the class path then.