1

I am trying to access files on a network computer via a J2ME MIDlet. This MIDlet runs on a device that is connected to the network via a WI-FI router. The MIDlet can see the other devices (that is, it has visibility to the other devices's IP on the network).

Has anyone done this successfully? If yes, what connection API have you used and if you could share some code?

I have tried using the FileConnection API, but passing the following results in connection error:

conn = (FileConnection)Connector.open("file://IP_OF_COMPUTER_ON_SAME_NETWORK/");

As per the FileConnection API, you should be able to connect to devices on the network as it allows hostname access.

I am unable to run a web server on the designated computer otherwise I would just write a simple web script (and run a web server).

Thanks in advance, Vikram

Coral Doe
  • 1,925
  • 3
  • 19
  • 36
Vikram Goyal
  • 159
  • 1
  • 13

2 Answers2

1

AFAIK, you can not access File from remote Computer directly. And if you still want to do it , your mobile must be connected with the remote computer by WiFi or GPRS.

Altaaf
  • 527
  • 3
  • 11
0

Install apache on the remote computer and set it up as a server (localhost). You can then view the file folders via the phone browser.

  • Welcome to SO! As mentioned in the question, Vikram is unable to run a server on the designated computer. Do you have another suggestion that does not involve running a server? – Enigmadan Jul 22 '13 at 09:28