Newbie Java/JME questions

Hi,



I’m working with Eclipse implementation of JME and I would like to know which property of Java, Eclipse or the JMonkey source code makes it so that when I add jMonkeyEngine3.jar to the the build path, all the libraries in the /lib folder are also added to the path?

This seems to be specific to Eclipse since NetBeans requires you to add every library individually.



Also, regarding the Asset Manager:

How does the asset manager know which “/assets” directory to go to when there’s more than one. For example in Tutorial 3 you use the jme3-test-data library which contains an “/assets” directory from which the asset manager load the necessary models, but I still have a “/assets” in my “scr” directory which is empty.



Secondly, when it comes to directory paths, how come functions such as the Material constructor require a path of the type:

“Common/MatDefs/Misc/Unshaded.j3md” (where is that Common directory located?)

and not simply “MatDefs/Misc/Unshaded.j3md” (which is the type of path you use with the asset manager)



My other question would be more appropriate on a Java forum but since I’m here:

I’m not quite sure what the difference between Adding external JARs and adding Libraries is. I suppose that in this case, all the JAR files are individual and not regrouped in separate libraries. Is that correct?

Why dont you just use jMP/NetBeans, it makes these things simple while still using the proper java names and tools for everything so you can learn while using it :wink: The assetManagers paths work similar to a classpath but you can add multiple sources to it, not just jar files. In addition, the classpath is in the assetmanagers root too. If your matdef is at MatDefs/ instead of Common/MatDefs you did something wrong.

I simply am in a situation where I have to work at different locations with different environments. Also, Eclipse is the IDE I’m the most familiar with.

Still, how come when I add jMonkeyEngine3.jar to the the build path, all the libraries in the /lib folder are also added to the path?

Probably because jMonkeyEngine3.jar references them in its class-path. NetBeans just doesn’t have that feature …


normen said:
The assetManagers paths work similar to a classpath but you can add multiple sources to it, not just jar files. In addition, the classpath is in the assetmanagers root too. If your matdef is at MatDefs/ instead of Common/MatDefs you did something wrong.


So, what would happen if I had two different files with the same name which are in two separate "/assets" directory.
E.g.: "assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg")" which is in the test-data library
and "assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg")" which is in my project directrory.

One of them will be loaded … I guess it depends on the order they were added