Find directory for “application data” on linux and macintosh

后端 未结 2 1511
一向
一向 2020-12-15 22:35

I have a game engine based on LWJGL, and to run it I need to place the required native libraries onto the user\'s computer. On Windows, I do so by finding the Application Da

2条回答
  •  温柔的废话
    2020-12-15 23:12

    As already stated on Linux you should/could put your data in a .directory in the home.

    I have however a tip for you: "APPDATA" unfortunately doesn't always find the correct directory across several WindowsVersions. AFAIK the only know way i know how to do this correctly is calling a msdn-function called SHGetFolderPath.

    Sample: http://github.com/fab1an/appkit/blob/master/src/main/java/org/appkit/osdependant/OSFolders.java

提交回复
热议问题