Solved

java pocketpc sync

Posted on 2003-12-01
43
321 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:shiznet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 24
  • 19
43 Comments
 
LVL 92

Expert Comment

by:objects
ID: 9854003
what vm are u running?
0
 
LVL 92

Expert Comment

by:objects
ID: 9854012
> 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
 
LVL 92

Expert Comment

by:objects
ID: 9854027
>  i mean its not a valid drive

are you sure?  I would have thought it was mapped to a drive.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:shiznet
ID: 9854089
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
 
LVL 92

Expert Comment

by:objects
ID: 9854114
Same you access any file.
0
 

Author Comment

by:shiznet
ID: 9854141
yea but what is the path?
i mean its not like it c:\storage card
right? so do u know what is it?
0
 
LVL 92

Expert Comment

by:objects
ID: 9854143
whats its path in explorer?
0
 
LVL 92

Expert Comment

by:objects
ID: 9854149
I think the folder that it is mapped to is specified in the registry.
0
 

Author Comment

by:shiznet
ID: 9854158
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
 
LVL 92

Expert Comment

by:objects
ID: 9854172
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
 
LVL 92

Expert Comment

by:objects
ID: 9854176
Have a look in your registry at:
HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk
0
 

Author Comment

by:shiznet
ID: 9854178
no but it doesnt make sence
0
 

Author Comment

by:shiznet
ID: 9854199
i dont have Drivers in HKEY_LOCAL_MACHINE
i am useing winxp
0
 
LVL 92

Expert Comment

by:objects
ID: 9854237
what did the test code I posted above display?
0
 

Author Comment

by:shiznet
ID: 9856309
error
0
 
LVL 92

Expert Comment

by:objects
ID: 9856321
what error and where
0
 

Author Comment

by:shiznet
ID: 9856569
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
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 9856628
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
 

Author Comment

by:shiznet
ID: 9856791
i dont have the listFiles method in java.io.*
why?
0
 
LVL 92

Expert Comment

by:objects
ID: 9856819
>  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
 

Author Comment

by:shiznet
ID: 9858339
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
 
LVL 92

Expert Comment

by:objects
ID: 9861605
> 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
 

Author Comment

by:shiznet
ID: 9861763
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
 
LVL 92

Expert Comment

by:objects
ID: 9862552
> 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
 

Author Comment

by:shiznet
ID: 9862721
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
 
LVL 92

Expert Comment

by:objects
ID: 9862792
Its not a usb device (is it?).
0
 
LVL 92

Expert Comment

by:objects
ID: 9862805
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
 

Author Comment

by:shiznet
ID: 9862807
it is a usb device (its connected to the usb)
0
 
LVL 92

Expert Comment

by:objects
ID: 9862824
sorry I misunderstood, so what card reader are you using?
0
 

Author Comment

by:shiznet
ID: 9862838
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
 
LVL 92

Expert Comment

by:objects
ID: 9862851
> 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
 

Author Comment

by:shiznet
ID: 9862920
so isnt any java library to handle this things? or i should write down it my self?
0
 
LVL 92

Expert Comment

by:objects
ID: 9862935
yes java.io but if you do not know *where* the files are then how can you copy them.
0
 

Author Comment

by:shiznet
ID: 9862953
i ment something special to pocket pc or mobile devices?
or something that would tell me how to get to this files
0
 
LVL 92

Expert Comment

by:objects
ID: 9862982
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
 

Author Comment

by:shiznet
ID: 9862998
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
 
LVL 92

Expert Comment

by:objects
ID: 9863027
if you can see it in explorer then it has a path.
0
 

Author Comment

by:shiznet
ID: 9863058
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
 
LVL 92

Expert Comment

by:objects
ID: 9863079
but your running the app on the ppc aren't you? Of course it won't exist outside that box.

0
 

Author Comment

by:shiznet
ID: 9863095
NO i am trying to run a app on my pc to acsses files on the ppc
0
 
LVL 92

Expert Comment

by:objects
ID: 9863130
sorry I have totally misunderstood you.
0
 

Author Comment

by:shiznet
ID: 9865803
soo anyone can help me?
0
 
LVL 92

Expert Comment

by:objects
ID: 9869606
same principles apply though, you need the path of what you are copying from and the path of what you are copying to.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question