Manage game directory for setting and how to place jme dlls there

I’m creating in the users home directory a folder to mange the setting and related stuff.

I also wanted to place the dll files which jme generates within it’s launch directory to place there.



Anybody can recommend how to do that?

a) is already done when the application directory is not writable, simply make that the case

b) is implemented in the SaveGame utility

Alright, still is there a way to control where the dlls are generated?

no as its platform and deployment type dependent

Why do you even need to control this? Its already taken care of for you.

1 Like

Maybe he’s worried about deployment.

@openjonny said:
Alright, still is there a way to control where the dlls are generated?


See Natives.setExtractionDir

But if you extract the DLLs to a different location then be prepared for the application not to work anymore. If java can’t find the DLLs in one of a few standard places then they will fail to load.

@pspeed said:
But if you extract the DLLs to a different location then be prepared for the application not to work anymore. If java can't find the DLLs in one of a few standard places then they will fail to load.

That's not true. LWJGL and JInput supports extracting natives to any folder through special system properties (jME3 will use them automatically). If you use other types of natives such as bullet, this feature might not be supported though.

The problem we always had wasn’t with the main DLLs but any DLLs they depended on. May not come up in this case, I guess. I’ve just tucked it away in my head that it’s bad ju-ju to mess with DLL paths.

@pspeed said:
The problem we always had wasn't with the main DLLs but any DLLs they depended on. May not come up in this case, I guess. I've just tucked it away in my head that it's bad ju-ju to mess with DLL paths.

LWJGL depends on OpenAL, but if you look at the source it uses the same way to detect native paths that LWJGL itself is using.
@Momoko_Fan said:
LWJGL depends on OpenAL, but if you look at the source it uses the same way to detect native paths that LWJGL itself is using.


We are pretty far off topic by now. The case I remember is having to specifically loadLibrary() all twelve of my DLL's dependencies because we wanted it to run from different directories (and from Webstart). If the DLLs are in the normal places then this wasn't necessary as the OS would properly load the dependencies. It was still lame.