I thought of a solution myself that works rather well. Don’t know why I didn’t think of it sooner; I just check which binaries are needed, then I copy them into the root directory (where the jar is). “.” seems to always be part of the “java.library.path”.
Here’s my solution:
/* Imports used for this. */
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.channels.FileChannel;
/* Code to be placed in the application's main method. */
try {
String[] binaries = {"win/64/jogl.dll", "win/64/jogl_awt.dll"};
for (int i=0; i<binaries.length; i++) {
File srcFile = new File("./binaries/" + binaries[i]);
File dstFile = new File("./" + binaries[i]
.substring(binaries[i].lastIndexOf('/')));
if (!dstFile.exists()) { //safety - keep existing files
dstFile.createNewFile();
FileChannel source = null;
FileChannel destination = null;
source = new FileInputStream(srcFile).getChannel();
destination = new FileOutputStream(dstFile).getChannel();
destination.transferFrom(source, 0, source.size());
source.close();
destination.close();
}
}
} catch (Exception e) {
System.err.println("Error (insert explanation of what has gone " +
"wrong here and show instructions to the user so that he " +
"can do the job manually).");
System.exit(1);
}
The code will be placed at the top of main() and what it does is copying two DLL files to the same folder as the jar (from inside a “binaries” folder that rests in the same path as the jar).
I’ve tried making the code clean so that it will be easy to read, use and understand, that way other people who find this topic can just copy it and be good to go. I’ve read by the way that the way I’m copying files should be really effective.)
What would be great now is a way to compress the binaries. Maybe hide them inside the jar file and then extract them? Is there a way of doing that without making it fail on a lot of computers due to security issues (for example in schools)? Otherwise is it any way of compressing them into their own archives somehow and then extract them?
“jogl.dll” and “jogl_awt.dll” takes 328 KiB uncompressed, and if that is how it is for many other system binaries as well the inclusion of all libraries will easily add over 1 MiB of unnecessary space. By using WinRAR’s best compression method I’m able to reduce the two DLL files from 328 KiB to only 26.7 KiB.
An additional thought, can the running application launch other jars with arguments? Maybe even arguments to the Java Virtual Machine? If so, I can just have main() check which OS it is running on and then start the same jar file again with the “-Djava.library.path=…” argument, adding the correct binaries folder that way. Right? (An additional argument would be passed on to the jar so that main skips the OS check and proceeds to launch the game.)
Please try to answer all questions in this post if you can, they are all important. 
(Note that this topic is NOT to be considered over yet just because I said “here’s my solution” at the beginnig of the post, hehe.)
Edit: Clarified some things.