Reputation:
When my program runs, following error was taken:
Excepiton in theard "AWT -EventQueue -1" java.lang.UnsatisfiedLinkError: program.dll: Not enough storage is avaliable to process this command
[java] at java.lang.ClassLoader$NativeLibrary.load<Native Method>
[java] at java.lang.ClassLoader.loadLibrary0<ClassLoader.java:1751>
[java] at java.lang.ClassLoader.loadLibrary<ClassLoader.java:1647>
[java] at java.lang.Runtime.load0<Runtime.java:769>
[java] at java.lang.System.load<System.java:968>
How can I solve this problem...
Thanks for help..
Upvotes: 1
Views: 2606
Reputation: 34321
When native libraries are loaded into the JVM they are mapped into the JVMs address space and any calls they make to allocate memory do so in that address space - therefore in a 32bit world you've got a maximum of 4GB to play with.
Competing for this 4GB is the JVM and it's heap (although I believe there are limits to the heap size other than the address space that a JVM specific).
Anyway, from your comments on @akf's answer it looks like there's plenty of memory.
I'd also consider that the term 'storage' could refer to more than just memory.
From the Javadoc on java.lang.UnsatisfiedLinkError
:
Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
Please explain/confirm:
program.dll
on your java.library.path
and are you successfully calling other methods on it.program.dll
and what are you using it for.Upvotes: 1
Reputation: 39495
This is a message from Windows indicating that you have run out of memory - not your Java heap, but the machine heap. How does the memory look on your machine while you are trying to run your app?
Upvotes: 1