The input stream is from the native file in your. Where copyFileFromJar() just makes an input stream and an output stream, then streams until it can stream no more. For example Win_X86 would be something like: String path = ().getCodeSource().getLocation().getPath() ĬopyFileFromJar("/assets/native/windows/jinput-raw.dll",ĬopyFileFromJar("/assets/native/windows/jinput-dx8.dll",ĬopyFileFromJar("/assets/native/windows/lwjgl.dll",ĬopyFileFromJar("/assets/native/windows/OpenA元2.dll", Depending on the OS and architecture you'll load certain files from the LWJGL native binaries. Then you load your natives that are packaged in your. Use those to return an enum that defines your OS and architecture, i.e. String OS_Name = System.getProperty("os.name").toLowerCase() Then you have your getPlatform() function ( step 1 from above), you can get the OS details like so: String OS_Arch = System.getProperty("os.arch").toLowerCase() So at the beginning of your main function goes: loadNatives(getPlatform())
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |