java pocketpc sync

HI to all experts out there.
i am doing a small java application that randomly changes the songs on a storage card on the pocket pc.
my problem is
1. how can copy files to the pocket pc, i mean its not a valid drive so how can i reach it?
2. is there anywhy to make my application run with MS active sync?
thanks Alot shiznet
shiznetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

objectsCommented:
what vm are u running?
0
objectsCommented:
> 2. is there anywhy to make my application run with MS active sync?

the vm is just another application soi it can be run like any others.
0
objectsCommented:
>  i mean its not a valid drive

are you sure?  I would have thought it was mapped to a drive.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

shiznetAuthor Commented:
the JVM is the standard jdk 1.4.1
the question is how can i reach the storege card on the ppc and if i can make it run with the activesync or sync it with the other programs.
its doesnt matter if i have JVM on my ppc (althogh i hvae jeode) i just want to reach the files on it.
thanks Shiznet.
0
objectsCommented:
Same you access any file.
0
shiznetAuthor Commented:
yea but what is the path?
i mean its not like it c:\storage card
right? so do u know what is it?
0
objectsCommented:
whats its path in explorer?
0
objectsCommented:
I think the folder that it is mapped to is specified in the registry.
0
shiznetAuthor Commented:
i double click on "my mobile device"
the on the "my pocket pc" icon
then on the sotrage card and the thing that i have on explorer path it
\Storage Card
0
objectsCommented:
SO have youu tried:

File dir = new File("/Storage Card");

Or another test would be:

File root = new File("/");
File[] sub = root.listFiles();
for (int i=0; i<sub.length; i++)
{
   System.out.println(sub[i]);
}
0
objectsCommented:
Have a look in your registry at:
HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk
0
shiznetAuthor Commented:
no but it doesnt make sence
0
shiznetAuthor Commented:
i dont have Drivers in HKEY_LOCAL_MACHINE
i am useing winxp
0
objectsCommented:
what did the test code I posted above display?
0
shiznetAuthor Commented:
error
0
objectsCommented:
what error and where
0
shiznetAuthor Commented:
its not giveing me any errors its just giveing me any errors its just giveing me a list of files in c:\ and not my ppc.
0
objectsCommented:
Try the following to locate where it is:

File storage = find(new File("/"), "Storage");



public static File find(File root, String name)
{
   File result = null;
   File[] sub = root.listFiles();
   for (int i=0; result==null && i<sub.length; i++)
   {
      System.out.println(sub[i]);
      if (sub[i].isDirectory())
      {
         if (sub[i].getName().startsWith(name)) return sub[i];
         result = find(sub[i], name);
      }
   }
   return result;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
shiznetAuthor Commented:
i dont have the listFiles method in java.io.*
why?
0
objectsCommented:
>  its just giveing me a list of files in c:\

but u said the earlier code gave u a list of files?
Sorry I'm confused.
0
shiznetAuthor Commented:
i tried to write a simple file chooser and i cant see in it the mobile device that i can see in the my computer section.
so how can i get directly to the storage card any idea?
0
objectsCommented:
> so how can i get directly to the storage card any idea?

you need to determine where it is mounted.
which is what the code I posted above will attempt to locate. Unless you can find it out from explorer.


0
shiznetAuthor Commented:
i ran you code and it came out with only the file list on c:\document and seting
and no storage card location is there any java labarray to use?
0
objectsCommented:
> then on the sotrage card and the thing that i have on explorer path it \Storage Card

What are the properties of this folder?
In particular the location. (check its not a shortcut)
0
shiznetAuthor Commented:
there are not properties there is only open/explore/create short cut
how about some thing that writes to the usb will it help me?
do you have any?
thanks shiznet
0
objectsCommented:
Its not a usb device (is it?).
0
objectsCommented:
Only other suggestion would be to search the registry for the entry specifying its mount point.

If you are unable to determine the path that it is mounted on then I don't see how I can help you.
0
shiznetAuthor Commented:
it is a usb device (its connected to the usb)
0
objectsCommented:
sorry I misunderstood, so what card reader are you using?
0
shiznetAuthor Commented:
secure digital all i want is to copy/delete files to/from it the SD is in my IPAQ 3950 that connected to the usb
0
objectsCommented:
> all i want is to copy/delete files to/from it

And to do that you need to know its location in the file system :)
0
shiznetAuthor Commented:
so isnt any java library to handle this things? or i should write down it my self?
0
objectsCommented:
yes java.io but if you do not know *where* the files are then how can you copy them.
0
shiznetAuthor Commented:
i ment something special to pocket pc or mobile devices?
or something that would tell me how to get to this files
0
objectsCommented:
no its just another file afaik, same as you don't need to do anything special to access a file on a floppy or a CD.
0
shiznetAuthor Commented:
yea but the files on the ppc are not in a drive you cant go to d:\
its some kind of a virtual directory
0
objectsCommented:
if you can see it in explorer then it has a path.
0
shiznetAuthor Commented:
we are going in around and around here.
the path in the explorer is \Storage Card ofcrouse when i write it down anywhere out side the ppc its telling me directory doesnt excit
so do you have a sulotion we are just going to go in circles here? :)
Thanks shiznet
0
objectsCommented:
but your running the app on the ppc aren't you? Of course it won't exist outside that box.

0
shiznetAuthor Commented:
NO i am trying to run a app on my pc to acsses files on the ppc
0
objectsCommented:
sorry I have totally misunderstood you.
0
shiznetAuthor Commented:
soo anyone can help me?
0
objectsCommented:
same principles apply though, you need the path of what you are copying from and the path of what you are copying to.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.