Note that there are some explanatory texts on larger screens.

plurals
  1. POIncluding Native Library in Netbeans
    primarykey
    data
    text
    <p>I am trying to read portable devices from java signed applet.... I found a jmtp library on <a href="http://code.google.com/p/jmtp/w/list" rel="noreferrer">http://code.google.com/p/jmtp/w/list</a> to get access to portable devices but when i run it in netbeans it gives error <pre> Exception in thread "main" java.lang.UnsatisfiedLinkError: no jmtp in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at jmtp.PortableDeviceManagerImplWin32.(PortableDeviceManagerImplWin32.java:38) at jmtp.PortableDeviceManager.(PortableDeviceManager.java:34) at jmtp.Jmtp.main(Jmtp.java:23) Java Result: 1 </pre></p> <p>I searched and found that i have to include .dll file as native library in project of jmtp... I right-clicked on project and navigated to properties and then Selected "Run" and Selected VM Option as <pre>-Djava.library.path="c:\jmtp\native\windows"</pre> and placed that jmtp.dll file in c:\jmtp folder</p> <p>But same error appears constantly my code is </p> <p><pre> package jmtp;</p> <pre><code>import jmtp.PortableDevice; import jmtp.PortableDeviceManager; import jmtp.PortableDeviceObject; import jmtp.PortableDeviceStorageObject; public class Jmtp { public static void main(String[] args) { PortableDeviceManager manager = new PortableDeviceManager(); PortableDevice device = manager.getDevices()[0]; // Connect to my mp3-player device.open(); System.out.println(device.getModel()); System.out.println("---------------"); // Iterate over deviceObjects for(PortableDeviceObject object : device.getRootObjects()) { // If the object is a storage object if(object instanceof PortableDeviceStorageObject) { PortableDeviceStorageObject storage = (PortableDeviceStorageObject)object; for(PortableDeviceObject o2 : storage.getChildObjects()){ System.out.println(o2.getName()); } } } manager.getDevices()[0].close(); } } </code></pre> <p></pre> </p> <p>please, tell me what is the issue</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload