• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding dll in java  RSS feed

 
Suprita Bommannavar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me........ i am not getting how to add dll in netbeans ...i tried lot but im not getting ....it showing following error

java.lang.UnsatisfiedLinkError:C:\WINDOWS\system32\rfidwrapper.dll: Can't load this .dll (machine code=0x1c2) on a IA 32-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1087)
 
Suprita Bommannavar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rfidwrapper.dll in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1878)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1087)
at CSLibrary.Intel.Native.<clinit>(Unknown Source)
at CSLibrary.Tools.FullScreen.Start(Unknown Source)
at CS101JavaDemoApp.Main.<init>(Main.java:40)
at CS101JavaDemoApp.Main$10.run(Main.java:519)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it a DLL targeted for WinCE or some such embedded platform?
I believe 0x1c2 refers to ARM Thumb instruction set, and if so, it's a binary that's targeted at an ARM platform/device. You can't execute or use it on an Intel/AMD 32-bit or 64-bit machine, unless it's running an ARM emulator.
 
Suprita Bommannavar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for replying...i have added dll file in system32 path so i got dat error...but now im adding dll in library path...and im getting this following error.....so please let me know how to solve this problem and exactly im not getting where to add dll files....

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rfidwrapper.dll in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1878)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1087)
at CSLibrary.Intel.Native.<clinit>(Unknown Source)
at CSLibrary.Tools.FullScreen.Start(Unknown Source)
at CS101JavaDemoApp.Main.<init>(Main.java:40)
at CS101JavaDemoApp.Main$10.run(Main.java:519)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
....but now im adding dll in library path...

Is this the exact same DLL file that gave the earlier "Can't load this DLL..0x1c2..." error?
If it's the same DLL as earlier, then it's never going to work regardless of the directory it's placed in, because it contains code which is incompatible with Intel architecture CPUs.


On the other hand, if you've now replaced it with one targeted for Intel architecture, then you can follow any one of these methods:
1) Specify the directory as a system property (using -D argument):
java -Djava.library.path=<directory_with_your_DLL> ...

2) or place it in a directory which is already part of PATH environment variable (such as \windows\system32).
3) or place it in any directory of your choice and add that directory to PATH from Computer > Properties dialog
4) or set PATH only for the cmd window or BAT file you're executing the application in.
 
Suprita Bommannavar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ha...but where should i make changes that im not getting....and how and where to change this Intel architecture of CPU... ...
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karthik explained you how to set the path that Java uses to look for DLLs: use the -Djava.library.path=... option on the command line.

Suprita Bommannavar wrote:and how and where to change this Intel architecture of CPU...

You can ofcourse not change the architecture of your CPU. The DLL that you are trying to use is for an ARM CPU, which is a CPU type that is commonly used in mobile devices or other small computers. Normal desktop and laptop PCs have Intel x86 CPUs. You cannot run code for an ARM CPU on your desktop or laptop computer. You will need to find a different version of the DLL, one that is made for Intel x86 CPUs.

I wonder what you're really trying to do. What is the purpose of the program that you are working on? "rfidwrapper.dll" sounds like it has something to do with RFID devices. Is the program doing something with reading data from RFID devices? Some mobile phones have an RFID reader installed, but most normal PCs don't. So I wonder why you are trying to run this program on a normal PC. It sounds like you have a program that is meant to be run on a specific kind of mobile device with an RFID reader.
 
Suprita Bommannavar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanku for reply ...and yeah im working on RFID Device.....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!