Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found the solution to above problem using JMTP library on </p> <pre>http://code.google.com/p/jmtp/</pre> <p>Here is my code</p> <p><pre> package jmtp;</p> <pre><code>import be.derycke.pieter.com.COMException; import be.derycke.pieter.com.Guid; import java.io.*; import java.math.BigInteger; import jmtp.PortableDevice; import jmtp.*; 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()) { // // BigInteger bigInteger1 = new BigInteger("123456789"); // File file = new File("c:/JavaAppletSigningGuide.pdf"); // try { // storage.addAudioObject(file, "jj", "jj", bigInteger1); // } catch (Exception e) { // //System.out.println("Exception e = " + e); // } // System.out.println(o2.getOriginalFileName()); } } } manager.getDevices()[0].close(); } } </code></pre> <p></pre> <b>Donot forget add jmtp.dll files (that comes up with jmtp download) as a native library for more info see my answer on </b></p> <pre>http://stackoverflow.com/questions/12798530/including-native-library-in-netbeans</pre>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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